toysolver-0.0.6: Assorted decision procedures for SAT, Max-SAT, PB, MIP, etc

Portabilityportable
Stabilityprovisional
Maintainermasahiro.sakai@gmail.com
Safe HaskellSafe-Inferred

Data.LBool

Description

Lifted boolean type.

Synopsis

Documentation

data LBool Source

Lifted Bool type. It has three values lTrue, lFalse, lUndef.

Instances

lTrue :: LBoolSource

lifted true value

lFalse :: LBoolSource

lifted false value

lUndef :: LBoolSource

undefined truth value

lnot :: LBool -> LBoolSource

   lnot lTrue == lFalse
   lnot lFalse == lTrue
   lnot lUndef == lUndef

liftBool :: Bool -> LBoolSource

   liftBool True == lTrue
   liftBool False == lFalse

unliftBool :: LBool -> Maybe BoolSource

   unliftBool lTrue == Just True
   unliftBool lFalse == Just False
   unliftBool lUndef == Nothing