about summary refs log blame commit diff
path: root/third_party/bazel/rules_haskell/tutorial/lib/Bool.hs
blob: 7390fcc0b838979ec54bb1801c80c71958926ee8 (plain) (tree)


















                                                                              
-- base is not available when no dependencies, so we have to define everything
-- from scratch.
{-# LANGUAGE NoImplicitPrelude #-}

module Bool where

data Bool = False | True

not :: Bool -> Bool
not False = True
not True = False

and :: Bool -> Bool -> Bool
and True True = True
and _ _ = False

or :: Bool -> Bool -> Bool
or False False = False
or _ _ = True