Newtype wrappers

Mikhail Glushenkov the.dead.shall.rise at
Mon Jan 14 20:48:59 CET 2013


On Mon, Jan 14, 2013 at 8:14 PM, Andrea Vezzosi <sanzhiyan at> wrote:
> Have you considered the effect on types like Data.Set that use the
> uniqueness of typeclass instances to maintain invariants? e.g. even when we
> have "newtype X = X Y" coercing "Set X" to "Set Y" can produce a tree with
> the wrong shape for the Ord instance of Y.

But isn't this already possible via GeneralizedNewtypeDeriving?

()  ascii ribbon campaign - against html e-mail
/\   - against proprietary attachments

More information about the Glasgow-haskell-users mailing list