[Haskell-beginners] Bool newtype

Imants Cekusins imantc at gmail.com
Sun Aug 7 11:45:54 UTC 2016


for a Bool-like newtype:

newtype B = B Bool

, is there an easy way to use this newtype B in place of Bool?

e.g.

let b1 = B True
in if b1 then 1 else 0

?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160807/73382b87/attachment.html>


More information about the Beginners mailing list