Safe HaskellSafe

Data.Algorithm.SatSolver.Var

Contents

Synopsis

Type

newtype Var a Source #

Var type

Constructors

Var 

Fields

Instances
Eq a => Eq (Var a) Source # 
Instance details

Defined in Data.Algorithm.SatSolver.Var

Methods

(==) :: Var a -> Var a -> Bool

(/=) :: Var a -> Var a -> Bool

Ord a => Ord (Var a) Source # 
Instance details

Defined in Data.Algorithm.SatSolver.Var

Methods

compare :: Var a -> Var a -> Ordering

(<) :: Var a -> Var a -> Bool

(<=) :: Var a -> Var a -> Bool

(>) :: Var a -> Var a -> Bool

(>=) :: Var a -> Var a -> Bool

max :: Var a -> Var a -> Var a

min :: Var a -> Var a -> Var a

Show a => Show (Var a) Source #

Show instance

Instance details

Defined in Data.Algorithm.SatSolver.Var

Methods

showsPrec :: Int -> Var a -> ShowS

show :: Var a -> String

showList :: [Var a] -> ShowS

Constructing

mk :: a -> Var a Source #

mk n makes a propositional variable with name n.

>>> [mk i | i <- [1..4]]
[1,2,3,4]
>>> [mk i | i <- ['a'..'d']]
['a','b','c','d']
>>> [mk o | o <- [LT .. GT]]
[LT,EQ,GT]