base-compat-0.5.0: A compatibility layer for base

Safe HaskellSafe-Inferred

Data.Bool.Compat

Contents

Synopsis

Booleans

data Bool

Constructors

False 
True 

Instances

Operations

(&&) :: 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.

  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.

Since: 4.7.0.0