Data.Type.Bool

License BSD-style (see the LICENSE file in the distribution)
Maintainer [email protected]
Stability experimental
Portability not portable
Safe Haskell Safe
Language Haskell2010

Description

Basic operations on type-level Booleans.

Since: base-4.7.0.0

type family If cond tru fls where ... Source

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 Source

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 Source

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

© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.10.2/docs/html/libraries/base-4.14.1.0/Data-Type-Bool.html