Safe Haskell | None |
---|---|
Language | Haskell98 |
Derived from work by Gerrit vd Geest, but with searching structures for predicates to avoid explosion of search space during resolution.
- data CHRRule env subst = CHRRule {
- chrRule :: Rule (CHRConstraint env subst) (CHRGuard env subst)
- data Rule cnstr guard = Rule {
- ruleHead :: ![cnstr]
- ruleSimpSz :: !Int
- ruleGuard :: ![guard]
- ruleBody :: ![cnstr]
- (<==>) :: (MkRule r, MkSolverConstraint (SolverConstraint r) c1, MkSolverConstraint (SolverConstraint r) c2) => [c1] -> [c2] -> r
- (==>) :: (MkRule r, MkSolverConstraint (SolverConstraint r) c1, MkSolverConstraint (SolverConstraint r) c2) => [c1] -> [c2] -> r
- (|>) :: (MkRule r, MkSolverGuard (SolverGuard r) g') => r -> [g'] -> r
- class MkSolverConstraint c c' where
- toSolverConstraint :: c' -> c
- fromSolverConstraint :: c -> Maybe c'
- class MkSolverGuard g g' where
- toSolverGuard :: g' -> g
- fromSolverGuard :: g -> Maybe g'
Documentation
CHRRule | |
|
A CHR (rule) consist of head (simplification + propagation, boundary indicated by an Int), guard, and a body. All may be empty, but not all at the same time.
(Data cnstr, Data guard) => Data (Rule cnstr guard) Source | |
Show (Rule c g) Source | |
(PP c, PP g) => PP (Rule c g) Source | |
(Serialize c, Serialize g) => Serialize (Rule c g) Source | |
TTKeyable cnstr => TTKeyable (Rule cnstr guard) Source | |
(VarExtractable c, VarExtractable g, (~) * (ExtrValVarKey c) (ExtrValVarKey g)) => VarExtractable (Rule c g) Source | |
(VarUpdatable c s, VarUpdatable g s) => VarUpdatable (Rule c g) s Source | |
type TTKey (Rule cnstr guard) = TTKey cnstr Source | |
type ExtrValVarKey (Rule c g) = ExtrValVarKey c Source |
(<==>) :: (MkRule r, MkSolverConstraint (SolverConstraint r) c1, MkSolverConstraint (SolverConstraint r) c2) => [c1] -> [c2] -> r infix 1 Source
(==>) :: (MkRule r, MkSolverConstraint (SolverConstraint r) c1, MkSolverConstraint (SolverConstraint r) c2) => [c1] -> [c2] -> r infix 1 Source
(|>) :: (MkRule r, MkSolverGuard (SolverGuard r) g') => r -> [g'] -> r infixr 0 Source
class MkSolverConstraint c c' where Source
toSolverConstraint :: c' -> c Source
fromSolverConstraint :: c -> Maybe c' Source
MkSolverConstraint c c Source | |
(IsCHRConstraint e c s, (~) * (TTKey (CHRConstraint e s)) (TTKey c), (~) * (ExtrValVarKey (CHRConstraint e s)) (ExtrValVarKey c)) => MkSolverConstraint (CHRConstraint e s) c Source |
class MkSolverGuard g g' where Source
toSolverGuard :: g' -> g Source
fromSolverGuard :: g -> Maybe g' Source
MkSolverGuard g g Source | |
(IsCHRGuard e g s, (~) * (ExtrValVarKey (CHRGuard e s)) (ExtrValVarKey g)) => MkSolverGuard (CHRGuard e s) g Source |