type-indexed-queues-0.2.0.0: Queues with verified and unverified versions.

Safe HaskellNone
LanguageHaskell2010

TypeLevel.Bool

Description

Rebinable syntax helper.

Synopsis

Documentation

ifThenElse :: The Bool c -> ((c :~: True) -> a) -> ((c :~: False) -> a) -> a Source #

For use with -XRebindableSyntax. This function can be used to make Haskell look reasonably dependent:

depHask :: The Bool x -> IfThenElse x Int String
depHask cond =
    if cond
        then \Refl -> 1
        else \Refl -> "abc"

type family IfThenElse (c :: Bool) (true :: k) (false :: k) :: k where ... Source #

Type-level if then else.

Equations

IfThenElse True true false = true 
IfThenElse False true false = false