A typeclass and set of functions for working with newtypes.