singleton-bool-0.1.2.0: Type level booleans

Safe HaskellNone
LanguageHaskell2010

Data.Singletons.Bool

Contents

Synopsis

Documentation

data SBool b where #

Constructors

STrue :: SBool True 
SFalse :: SBool False 

class SBoolI b where #

Minimal complete definition

sbool

Methods

sbool :: SBool b #

Instances

SBoolI False # 

Methods

sbool :: SBool False #

SBoolI True # 

Methods

sbool :: SBool True #

Data.Type.Bool and .Equality

These are only defined with base >= 4.7

sboolAnd :: SBool a -> SBool b -> SBool (a && b) #

sboolOr :: SBool a -> SBool b -> SBool (a || b) #

sboolNot :: SBool a -> SBool (Not a) #

eqToRefl :: (a == b) ~ True => a :~: b #

Since: 0.1.1.0

eqCast :: (a == b) ~ True => a -> b #

Since: 0.1.1.0

sboolEqRefl :: forall a b. SBoolI (a == b) => Maybe (a :~: b) #

Useful combination of sbool and eqToRefl

Since: 0.1.2.0

trivialRefl :: () :~: () #

Since: 0.1.1.0