[Haskell-cafe] Quickcheck, Arbitrary and Overlapping instances

Valentin Robert valentin.robert.42 at gmail.com
Thu Sep 22 11:16:16 CEST 2011

I think it is one case where you should use newtype instead of type, so that 
it is not just a simple type synonym, but an actual "other" type.

With type, you're just making an alias, but Haskell sees the same type. A 
newtype wrapper will hide this, at the price of having to define a (unique) 
constructor... So yes, you'll have to change some code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110922/63239f36/attachment.htm>

More information about the Haskell-Cafe mailing list