ml

Copyright(c) Stéphane Vialette, 2014
LicenseMIT
Maintainervialette@gmail.com
Stabilityexperimental
Safe HaskellSafe-Inferred

Literal

Description

 

Synopsis

Documentation

type Literal = Int

Literal type

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