monadiccp-0.5.1: Constraint Programming



class Monad solver => Solver solver whereSource

Associated Types

type Constraint solver :: *Source

the constraints

type Label solver :: *Source

the labels


add :: Constraint solver -> solver BoolSource

add a constraint to the current state, and return whethe the resulting state is consistent

run :: solver a -> aSource

run a computation

mark :: solver (Label solver)Source

mark the current state, and return its label

goto :: Label solver -> solver ()Source

go to the state with given label


Solver FD 
Solver Prolog 
HTerm t => Solver (Herbrand t)

Solver instance

(Monoid w, Solver s) => Solver (WriterT w s)

WriterT decoration of a solver useful for producing statistics during solving

(Solver s, HTerm t) => Solver (HerbrandT t s) 

class Solver solver => Term solver term whereSource


newvar :: solver termSource

produce a fresh constraint variable


Term FD FD_Term 
Term Prolog PrologTerm 
HTerm t => Term (Herbrand t) t 
(Monoid w, Term s t) => Term (WriterT w s) t 
(HTerm t, Solver s, Term s st) => Term (HerbrandT t s) (R st) 
(HTerm t, Solver s) => Term (HerbrandT t s) (L t)