Given that Church Booleans basically either choose the first or second option, and you want to use them in something like
if' :: Boolean -> a -> a -> a
if' b tval fval = b tval fval
such that
if' t 1 0 == 1
if' f 1 0 == 0
you need to limit the type of one type variable a:
{-
type Boolean = forall a. a -> a -> a
Here's an article that details Haskell's Booleans elements .
source
share