Portability | portable (depends on ghc) |
---|---|

Stability | provisional |

Maintainer | bastiaan.heeren@ou.nl |

Safe Haskell | None |

- data Rule a
- transformation :: Rule a -> Transformation a
- recognizer :: Recognizable f => f a -> Recognizer a
- checkReferences :: Rule a -> Environment -> Maybe String
- makeRule :: (IsId n, MakeTrans f) => n -> (a -> f a) -> Rule a
- ruleMaybe :: IsId n => n -> (a -> Maybe a) -> Rule a
- ruleList :: IsId n => n -> (a -> [a]) -> Rule a
- ruleTrans :: IsId n => n -> Transformation a -> Rule a
- ruleRewrite :: RewriteRule a -> Rule a
- buggyRule :: (IsId n, MakeTrans f) => n -> (a -> f a) -> Rule a
- minorRule :: (IsId n, MakeTrans f) => n -> (a -> f a) -> Rule a
- rewriteRule :: (IsId n, RuleBuilder f a) => n -> f -> Rule a
- rewriteRules :: (IsId n, RuleBuilder f a) => n -> [f] -> Rule a
- idRule :: IsId n => n -> Rule a
- checkRule :: IsId n => n -> (a -> Bool) -> Rule a
- emptyRule :: IsId n => n -> Rule a
- ruleSiblings :: Rule a -> [Id]
- siblingOf :: HasId b => b -> Rule a -> Rule a
- isRewriteRule :: Rule a -> Bool
- isRecognizer :: Rule a -> Bool
- doAfter :: (a -> a) -> Rule a -> Rule a
- addRecognizer :: Recognizer a -> Rule a -> Rule a
- addRecognizerBool :: (a -> a -> Bool) -> Rule a -> Rule a
- addTransRecognizer :: (a -> a -> Bool) -> Rule a -> Rule a
- addRecognizerEnvMonad :: (a -> a -> EnvMonad ()) -> Rule a -> Rule a

# Rule data type and accessors

Abstract data type for representing rules

transformation :: Rule a -> Transformation aSource

recognizer :: Recognizable f => f a -> Recognizer aSource

checkReferences :: Rule a -> Environment -> Maybe StringSource

# Constructor functions

ruleTrans :: IsId n => n -> Transformation a -> Rule aSource

ruleRewrite :: RewriteRule a -> Rule aSource

rewriteRule :: (IsId n, RuleBuilder f a) => n -> f -> Rule aSource

rewriteRules :: (IsId n, RuleBuilder f a) => n -> [f] -> Rule aSource

# Special minor rules

checkRule :: IsId n => n -> (a -> Bool) -> Rule aSource

A special (minor) rule that checks a predicate (and returns the identity if the predicate holds)

emptyRule :: IsId n => n -> Rule aSource

A special (minor) rule that is never applicable (i.e., this rule always fails)

# Rule properties

ruleSiblings :: Rule a -> [Id]Source

isRewriteRule :: Rule a -> BoolSource

isRecognizer :: Rule a -> BoolSource

# Recognizer

addRecognizer :: Recognizer a -> Rule a -> Rule aSource

addRecognizerBool :: (a -> a -> Bool) -> Rule a -> Rule aSource

addTransRecognizer :: (a -> a -> Bool) -> Rule a -> Rule aSource

addRecognizerEnvMonad :: (a -> a -> EnvMonad ()) -> Rule a -> Rule aSource