toysolver-0.8.1: Assorted decision procedures for SAT, SMT, 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

newtype LBool Source #

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

Constructors

LBool Int8 

Instances

Instances details
Show LBool Source # 
Instance details

Defined in ToySolver.Data.LBool

Methods

showsPrec :: Int -> LBool -> ShowS #

show :: LBool -> String #

showList :: [LBool] -> ShowS #

Eq LBool Source # 
Instance details

Defined in ToySolver.Data.LBool

Methods

(==) :: LBool -> LBool -> Bool #

(/=) :: LBool -> LBool -> Bool #

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