Typo
[packages/base.git] / Data / Bool.hs
1 {-# LANGUAGE Trustworthy #-}
2 {-# LANGUAGE NoImplicitPrelude #-}
3
4 -----------------------------------------------------------------------------
5 -- |
6 -- Module : Data.Bool
7 -- Copyright : (c) The University of Glasgow 2001
8 -- License : BSD-style (see the file libraries/base/LICENSE)
9 --
10 -- Maintainer : libraries@haskell.org
11 -- Stability : experimental
12 -- Portability : portable
13 --
14 -- The 'Bool' type and related functions.
15 --
16 -----------------------------------------------------------------------------
17
18 module Data.Bool (
19 -- * Booleans
20 Bool(..),
21 -- ** Operations
22 (&&),
23 (||),
24 not,
25 otherwise,
26 bool,
27 ) where
28
29 import GHC.Base
30
31 -- | Case analysis for the 'Bool' type.
32 -- @bool a b p@ evaluates to @a@ when @p@ is @False@, and evaluates to @b@
33 -- when @p@ is @True@.
34 --
35 -- /Since: 4.7.0.0/
36 bool :: a -> a -> Bool -> a
37 bool f _ False = f
38 bool _ t True = t