base-4.10.1.0: Basic libraries

License | BSD-style (see the LICENSE file in the distribution)
Maintainer | libraries@haskell.org
Stability | experimental
Portability | not portable
Safe Haskell | Safe
Language | Haskell2010

Data.Type.Bool

Description

Basic operations on type-level Booleans.

Since: 4.7.0.0

Synopsis

- type family If cond tru fls where ...
- type family a && b where ...
- type family a || b where ...
- type family Not a = res | res -> a where ...

# Documentation

type family If cond tru fls where ... #

Type-level If. `If True a b` ==> `a`; `If False a b` ==> `b`

Equations

If True tru fls = tru |
If False tru fls = fls |

type family a && b where ... infixr 3 #

Type-level "and"

Equations

False && a = False |
True && a = a |
a && False = False |
a && True = a |
a && a = a |

type family a || b where ... infixr 2 #

Type-level "or"

Equations

False || a = a |
True || a = True |
a || False = a |
a || True = True |
a || a = a |

type family Not a = res | res -> a where ... #

Type-level "not". An injective type family since `4.10.0.0`.

Since: 4.7.0.0

Equations

Not False = True |
Not True = False |