[Haskell-cafe] Implicit newtype unwrapping

Gregory Crosswhite gcross at phys.washington.edu
Wed Dec 2 19:42:55 EST 2009

Out of curiosity, why would one want a "newtype" that were unwrapped implicitly, rather than just using "type"?

Personally, whenever I use a newtype it is precisely because I *want* the compiler not to implicitly turn it into something else in order to protect myself.


On Dec 2, 2009, at 4:16 PM, Martijn van Steenbergen wrote:

> So here's a totally wild idea Sjoerd and I came up with.
> What if newtypes were unwrapped implicitly?
> What advantages and disadvantages would it have?
> In what cases would this lead to ambiguous code?
> Thanks,
> Martijn.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list