Hoogle Search
Within LTS Haskell 24.27 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
getBool :: TExpr -> Maybe Boolclash-lib Clash.Primitives.DSL Try to get the literal bool value of an expression.
caseBool :: Expr -> Expr -> Expr -> Exprcode-conjure Conjure.Engine A function case :: Bool -> a -> a -> a lifted over the Expr type that encodes case-of-False-True functionality. This is properly displayed as a case-of-False-True expression.
> caseBool pp zero xx (case p of False -> 0; True -> x) :: Int
> zz -*- caseBool pp xx yy z * (case p of False -> x; True -> y) :: Int
> caseBool pp false true -||- caseBool qq true false (caseBool p of False -> False; True -> True) || (caseBool q of False -> True; True -> False) :: Bool
> evl $ caseBool true (val 'f') (val 't') :: Char 't'
By convention, the False case comes before True as False < True and data Bool = False | True. When evaluating, this is equivalent to if with arguments reversed. Instead of using this, you are perhaps better of using if encoded as an expression. This is just here to be consistent with caseOrdering.-
code-conjure Conjure.Engine The list constructor : encoded as an Expr.
-
code-conjure Conjure.Engine -
code-conjure Conjure.Engine -
code-conjure Conjure.Engine The Just constructor of the Bool element type encoded as an Expr.
-
code-conjure Conjure.Engine The empty list '[]' encoded as an Expr.
-
code-conjure Conjure.Engine caseBool :: Expr -> Expr -> Expr -> Exprcode-conjure Conjure.Expr A function case :: Bool -> a -> a -> a lifted over the Expr type that encodes case-of-False-True functionality. This is properly displayed as a case-of-False-True expression.
> caseBool pp zero xx (case p of False -> 0; True -> x) :: Int
> zz -*- caseBool pp xx yy z * (case p of False -> x; True -> y) :: Int
> caseBool pp false true -||- caseBool qq true false (caseBool p of False -> False; True -> True) || (caseBool q of False -> True; True -> False) :: Bool
> evl $ caseBool true (val 'f') (val 't') :: Char 't'
By convention, the False case comes before True as False < True and data Bool = False | True. When evaluating, this is equivalent to if with arguments reversed. Instead of using this, you are perhaps better of using if encoded as an expression. This is just here to be consistent with caseOrdering.-
code-conjure Conjure.Expr The list constructor : encoded as an Expr.