Consider replacing your bools with meaningful sum types, which avoids this issue, prevents boolean blindness, and makes your code more self-documenting.
For example, instead of newtype SwitchsState = SwitchState Bool, data SwitchState = On | Off
found it:
https://wiki.haskell.org/GHC/Coercible
yep, it type checks.
Ta
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners