[Haskell-beginners] Bool newtype

Imants Cekusins imantc at gmail.com
Sun Aug 7 14:59:38 UTC 2016


> newtype B = B { toBool :: Bool }

yep, this works well. toBool b1 is easy enough ;)

I wondered if there was an easy (with deriving etc) way to test B as it is.
If there isn't - no biggie.


‚Äč
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160807/69acef45/attachment.html>


More information about the Beginners mailing list