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 prio = Rule {}
- (<==>) :: forall r c1 c2. (MkRule r, MkSolverConstraint (SolverConstraint r) c1, MkSolverConstraint (SolverConstraint r) c2) => [c1] -> [c2] -> r
- (==>) :: forall r c1 c2. (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'
- class MkSolverPrio p p' where
- toSolverPrio :: p' -> p
- fromSolverPrio :: p -> Maybe p'
Documentation
CHRRule | |
|
data Rule cnstr guard prio Source
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.
Show (Rule c g p) Source | |
(PP c, PP g, PP p) => PP (Rule c g p) Source | |
(Serialize c, Serialize g, Serialize p) => Serialize (Rule c g p) Source | |
TTKeyable cnstr => TTKeyable (Rule cnstr guard prio) Source | |
(VarExtractable c, VarExtractable g, (~) * (ExtrValVarKey c) (ExtrValVarKey g)) => VarExtractable (Rule c g p) Source | |
(VarUpdatable c s, VarUpdatable g s) => VarUpdatable (Rule c g p) s Source | |
type TTKey (Rule cnstr guard prio) = TTKey cnstr Source | |
type ExtrValVarKey (Rule c g p) = ExtrValVarKey c Source |
(<==>) :: forall r c1 c2. (MkRule r, MkSolverConstraint (SolverConstraint r) c1, MkSolverConstraint (SolverConstraint r) c2) => [c1] -> [c2] -> r infix 1 Source
(==>) :: forall r c1 c2. (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 |
class MkSolverPrio p p' where Source
toSolverPrio :: p' -> p Source
fromSolverPrio :: p -> Maybe p' Source
MkSolverPrio p p Source | |
IsCHRPrio e p s => MkSolverPrio (CHRPrio e s) p Source |