Maintainer | bastiaan.heeren@ou.nl |
---|---|

Stability | provisional |

Portability | portable (depends on ghc) |

Safe Haskell | None |

Language | Haskell98 |

- class Different a where
- data RewriteRule a
- ruleSpecTerm :: RewriteRule a -> RuleSpec Term
- data RuleSpec a = a :~> a
- makeRewriteRule :: (IsId n, RuleBuilder f a) => n -> f -> RewriteRule a
- termRewriteRule :: (IsId n, IsTerm a, Show a) => n -> RuleSpec Term -> RewriteRule a
- class (IsTerm a, Show a) => RuleBuilder t a | t -> a where
- showRewriteRule :: Bool -> RewriteRule a -> Maybe String
- metaInRewriteRule :: RewriteRule a -> [Int]
- renumberRewriteRule :: Int -> RewriteRule a -> RewriteRule a
- symbolMatcher :: Symbol -> SymbolMatch -> RewriteRule a -> RewriteRule a
- symbolBuilder :: Symbol -> ([Term] -> Term) -> RewriteRule a -> RewriteRule a

# Supporting type class

# Rewrite rules and specs

data RewriteRule a Source #

ruleSpecTerm :: RewriteRule a -> RuleSpec Term Source #

a :~> a infixl 1 |

# Compiling rewrite rules

makeRewriteRule :: (IsId n, RuleBuilder f a) => n -> f -> RewriteRule a Source #

termRewriteRule :: (IsId n, IsTerm a, Show a) => n -> RuleSpec Term -> RewriteRule a Source #

class (IsTerm a, Show a) => RuleBuilder t a | t -> a where Source #

(IsTerm a, Show a) => RuleBuilder (RuleSpec a) a Source # | |

(Different a, RuleBuilder t b) => RuleBuilder (a -> t) b Source # | |

# Using rewrite rules

showRewriteRule :: Bool -> RewriteRule a -> Maybe String Source #

metaInRewriteRule :: RewriteRule a -> [Int] Source #

renumberRewriteRule :: Int -> RewriteRule a -> RewriteRule a Source #

symbolMatcher :: Symbol -> SymbolMatch -> RewriteRule a -> RewriteRule a Source #

symbolBuilder :: Symbol -> ([Term] -> Term) -> RewriteRule a -> RewriteRule a Source #