In my code, I have some data structures like this
data Guard =
GTriv
| GFalse
| GPos Int
| GNeg Int
| GAnd Guard Guard
| GOr Guard Guard
gAnd :: Guard -> Guard -> Guard
gAnd = undefined
gOr :: Guard -> Guard -> Guard
gOr = undefined
sat :: Guard -> Bool
sat = undefined
taut :: Guard -> Bool
taut = undefined
simplifyGuard :: Guard -> Guard
simplifyGuard = undefined
type Valuation = [Bool]
checkGuard :: Valuation -> Guard -> Bool
checkGuard = undefined
instance (Show Guard) where
show = undefined
Since Guard
is essentially a symbolic boolean expression, I figured there must be some library which I can use, which does all this efficiently, instead of trying to roll my own. What should I use?