| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Fcf.Data.Bool
Contents
Description
Booleans.
Note that the operations from this module conflict with Data.Type.Bool.
Documentation
data UnBool :: Exp a -> Exp a -> Bool -> Exp a Source #
N.B.: The order of the two branches is the opposite of "if":
UnBool ifFalse ifTrue bool.
This mirrors the default order of constructors:
data Bool = False | True ----------- False < True
Multi-way if
data Guarded :: a -> [Guard (a -> Exp Bool) (Exp b)] -> Exp b Source #
A conditional choosing the first branch whose guard a ->
accepts a given value Exp Boola.
Example
type UnitPrefix n =Eval(Guardedn '[TyEq0 ':=Pure"" ,TyEq1 ':=Pure"deci" ,TyEq2 ':=Pure"hecto" ,TyEq3 ':=Pure"kilo" ,TyEq6 ':=Pure"mega" ,TyEq9 ':=Pure"giga" ,Otherwise':=Error"Something else" ])