GHC.Internal.Data.Type.Bool

ghc-internal-9.1400.0: Basic libraries

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

GHC.Internal.Data.Type.Bool

Description

Basic operations on type-level Booleans.

Since: base-4.7.0.0

Synopsis

- type family If (cond :: Bool) (tru :: k) (fls :: k) :: k where ...
- type family (a :: Bool) && (b :: Bool) :: Bool where ...
- type family (a :: Bool) || (b :: Bool) :: Bool where ...
- type family Not (a :: Bool) = (res :: Bool) | res -> a where ...

# Documentation

type family If (cond :: Bool) (tru :: k) (fls :: k) :: k where ... Source #

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

Equations

If 'True (tru :: k) (fls :: k) = tru |
If 'False (tru :: k) (fls :: k) = fls |

type family (a :: Bool) && (b :: Bool) :: Bool where ... infixr 3 Source #

Type-level "and"

Equations

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

type family (a :: Bool) || (b :: Bool) :: Bool where ... infixr 2 Source #

Type-level "or"

Equations

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

type family Not (a :: Bool) = (res :: Bool) | res -> a where ... Source #

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

Since: base-4.7.0.0

Equations

Not 'False = 'True |
Not 'True = 'False |