base-compat-0.5.0: A compatibility layer for base
Data.Bool.Compat
Contents
Synopsis
data Bool
Constructors
Instances
(&&) :: Bool -> Bool -> Bool
Boolean "and"
(||) :: Bool -> Bool -> Bool
Boolean "or"
not :: Bool -> Bool
Boolean "not"
otherwise :: Bool
otherwise is defined as the value True. It helps to make guards more readable. eg.
otherwise
True
f x | x < 0 = ... | otherwise = ...
bool :: a -> a -> Bool -> aSource
Case analysis for the Bool type. bool a b p evaluates to a when p is False, and evaluates to b when p is True.
Bool
bool a b p
a
p
False
b
Since: 4.7.0.0