Copyright | (c) Stéphane Vialette, 2014 |
---|---|
License | MIT |
Maintainer | vialette@gmail.com |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Literal
Description
- type Literal = Int
- isPositiveLiteral :: Literal -> Bool
- isNegativeLiteral :: Literal -> Bool
- toVariable :: Literal -> Variable
Documentation
isPositiveLiteral :: Literal -> Bool
The isPositiveLiteral
return True is the literal is positive.
>>>
isPositiveLiteral 1
True>>>
isPositiveLiteral (-1)
False
isNegativeLiteral :: Literal -> Bool
The isPositiveLiteral
return True is the literal is positive.
>>>
isNegativeLiteral 1
False>>>
isNegativeLiteral (-1)
True
toVariable :: Literal -> Variable
The toVariable
returns the variable associated to a literal.
>>>
toVariable 1
1>>>
toVariable (-1)
1