Summary: Core machinery for rewriting terms.
- class (Regular a, Crush (PF a), GMap (PF a), Show (PF a), Zip (PF a), LR (PF a), Functor (PF a)) => Rewrite a
- applyRuleM :: (Builder r, Rewrite (Target r), Monad m) => r -> Target r -> m (Target r)
- applyRule :: (Builder r, Rewrite (Target r)) => r -> Target r -> Target r
- rewriteM :: (Rewrite a, Monad m) => Rule a -> a -> m a
- rewrite :: Rewrite a => Rule a -> a -> a
Type class synonym summarizing generic functions.
Rewrite is a type class synonym, hiding some of the implementation
To be able to use the rewriting functions, the user is required to provide an instance of this type class.
Applying a rule specification to a term.
Applies a rule specification to a term, obtaining a monadic value.
Applies a rule specification to a term, obtaining the original term when rewriting fails.
Rewriting a term.
Rewrites a term, obtaining a monadic value.