| base-4.2.0.2: Basic libraries | Contents | Index

Data.Bool

Portability | portable
Stability | experimental
Maintainer | libraries@haskell.org

Contents

Booleans
  Operations

Description
The `Bool` type and related functions.
Synopsis

data Bool

= False
| True

(&&) :: Bool -> Bool -> Bool
(||) :: Bool -> Bool -> Bool
not :: Bool -> Bool
otherwise :: Bool

Booleans
data Bool

Constructors

False |
True |

Instances

Bounded Bool
Enum Bool
Eq Bool
Data Bool
Ord Bool
Read Bool
Show Bool
Ix Bool
Typeable Bool
Storable Bool

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 = ...

Produced by Haddock version 2.6.1