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

Copyright(c) Masahiro Sakai 2012
LicenseBSD-style
Maintainermasahiro.sakai@gmail.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

ToySolver.Data.LBool

Description

Lifted boolean type.

Synopsis

Documentation

data LBool Source

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

Instances

lTrue :: LBool Source

lifted true value

lFalse :: LBool Source

lifted false value

lUndef :: LBool Source

undefined truth value

lnot :: LBool -> LBool Source

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

liftBool :: Bool -> LBool Source

  liftBool True == lTrue
  liftBool False == lFalse

unliftBool :: LBool -> Maybe Bool Source

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