Bool.hs (444B)
1 module Lude.Haskell.Bool ( 2 Bool (..), 3 ifThenElse, 4 ) where 5 6 import Data.Bool (Bool (..)) 7 8 import Lude.Haskell.Core 9 import Lude.Haskell.Functional 10 import Lude.Haskell.Type 11 12 -------------------------------------------------------------------------------- 13 14 ifThenElse :: forall {r :: Repr} (a :: Type# r). (Functional# r) => Bool -> a -> a -> a 15 ifThenElse True = lam2# \t _ -> t 16 ifThenElse False = lam2# \_ f -> f 17 {-# INLINE ifThenElse #-}