úÎD@Ÿ*      !"#$%&'() Safe-Infered BA class for boolean algebras. Instances of this class should obey $ all the axioms of boolean algebra. Minimal complete definition: , ,  or ,  or .  Truth value.  False value. Logical negation. Logical conjunction. Logical inclusive disjunction. Logical exclusive disjunction. Logical implication Logical biconditional Injection from * into a boolean algebra.  +,-./    +,-./ Safe-Infered Conversion of values to *.  Instances of   that are also ! should obey the following laws:  ' p || q = if toBool p then true else q ( p && q = if toBool p then q else false A simple conditional operator   with the *! argument at the end (infixr 1). >A catamorphism (aka fold) for booleans. This is analogous to  0, 1, and . The first argument is N the false case, the second argument is the true case, and the last argument  is the predicate value. JLisp-style conditionals. If no conditions match, then a runtime exception  is thrown. Here's a trivial example:  % signum x = cond [(x > 0 , 1 )  ,(x < 0 , -1) $ ,(otherwise , 0 )] )Lisp-style conditionals generalized over 2. If no conditions  match, then the result is 3. This is a safer variant of . Here'#s a highly contrived example using 4:   5 signum x = fromMaybe 0 . condPlus $ [(x > 0, 1 ) + ,(x < 0, -1)] !Alternatively, you could use the % operator from Hoare' s ternary ' conditional choice operator, like so:   signum x = 0 <| condPlus [(x > 0, 1 )  ,(x < 0, -1)] 4Conditional composition. If the predicate is False, 5 is returned M instead of the second argument. This function, for example, can be used to 5 conditionally add functions to a composition chain. <Composes a predicate function and 2 functions into a single L function. The first function is called when the predicate yields True, the ) second when the predicate yields False. Note that after importing Control.Monad.Instances,  becomes a  special case of .   lifted to 6 . Unlike 7   , this is O short-circuiting in the monad, such that only the predicate action and one of . the remaining argument actions are executed. %Lifted inclusive disjunction. Unlike 8 (), This function is 6 short-circuiting in the monad. Fixity is the same as  (infixr 2). Lifted conjunction. Unlike 8 (), this function is 6 short-circuiting in the monad. Fixity is the same as  (infxr 3). Lifted boolean negation. &Lifted boolean exclusive disjunction.  lifted to 6.. If no conditions match, a runtime exception  is thrown.  lifted to 6. If no conditions match, then 3  is returned. A synonym for 9 . Generalization of  Generalization of  Generalization of   A variant of  with a monadic predicate.  A variant of  with a monadic predicate.  A variant of  with a monadic predicate. ! lifted to 6. "1Conditional monoid operator. If the predicate is : , the second  argument is replaced with ;%. The fixity of this operator is one  level higher than <. GIt can also be used to chain multiple predicates together, like this: + even (length ls) ?<> not (null ls) ?<> ls #EAn operator that allows you to write C-style ternary conditionals of  the form:   p ? t ?? f BNote that parentheses are required in order to chain sequences of 7 conditionals together. This is probably a good thing. $CRight bracket of the conditional choice operator. If the predicate  is : , returns =, otherwise it returns > the right-hand  argument. %GLeft bracket of the conditional choice operator. This is equivalent to  4 &A monadic variant of $. 'A monadic variant of %. (Unicode rebinding of %. )Unicode rebinding of $. $  !"#$%&'()?@AB  !"#$%&'() "!#$%&')( #   !"#$%&'()?@ABC      !"#$%&'()*+,-./0123456789:8;<8=8>8;?8@A89B8C8D89E01F8GH8GI8;J8;KLMNOPcond-0.3Data.Algebra.BooleanControl.Conditional Data.Eithereither Control.MonadguardwhenunlessBooleantruefalsenot&&||xor--><-->fromBoolToBooltoBoolif'??boolcondcondPlus?.selectifM<||><&&>notMxorMcondM condPlusM otherwiseMwhenMunlessMguardMselectM?<>?|><||>><<|⊲⊳ghc-prim GHC.TypesBool $fBooleanEndo $fBooleanDual $fBooleanAll $fBooleanAny $fBooleanBoolbaseGHC.Basefoldr Data.Maybemaybe MonadPlusmzero fromMaybeControl.CategoryidMonadliftM3liftM2returnFalse Data.Monoidmempty<>NothingJust $fToBoolDual $fToBoolAll $fToBoolAny $fToBoolBool