Module

Type.Data.Boolean

Package
purescript-typelevel-prelude
Repository
purescript/purescript-typelevel-prelude

#Boolean Source

data Boolean :: Type

#True Source

data True :: Boolean

Instances

#False Source

data False :: Boolean

Instances

#BProxy Source

data BProxy (bool :: Boolean)

Value proxy for Boolean types

Constructors

#IsBoolean Source

class IsBoolean (bool :: Boolean)  where

Class for reflecting a type level Boolean at the value level

Members

Instances

#reifyBoolean Source

reifyBoolean :: forall r. Boolean -> (forall o. IsBoolean o => BProxy o -> r) -> r

Use a value level Boolean as a type-level Boolean

#And Source

class And (lhs :: Boolean) (rhs :: Boolean) (output :: Boolean) | lhs -> rhs output

And two Boolean types together

Instances

#and Source

and :: forall o r l. And l r o => BProxy l -> BProxy r -> BProxy o

#Or Source

class Or (lhs :: Boolean) (rhs :: Boolean) (output :: Boolean) | lhs -> rhs output

Or two Boolean types together

Instances

#or Source

or :: forall o r l. Or l r o => BProxy l -> BProxy r -> BProxy o

#Not Source

class Not (bool :: Boolean) (output :: Boolean) | bool -> output

Not a Boolean

Instances

#not Source

not :: forall o i. Not i o => BProxy i -> BProxy o

#If Source

class If (bool :: Boolean) (onTrue :: Type) (onFalse :: Type) (output :: Type) | bool -> onTrue onFalse output

If - dispatch based on a boolean

Instances

#if_ Source

if_ :: forall o e t b. If b t e o => BProxy b -> Proxy t -> Proxy e -> Proxy o