Safe Haskell | None |
---|---|

Language | Haskell98 |

Operations on lists of rules.

See also Data.Rewriting.CriticalPair

## Synopsis

- fullRewrite :: (Ord v', Eq v, Eq f) => [Rule f v'] -> Strategy f v v'
- type Strategy f v v' = Term f v -> [Reduct f v v']
- data Reduct f v v' = Reduct {}
- fullRewrite :: (Ord v', Eq v, Eq f) => [Rule f v'] -> Strategy f v v'
- outerRewrite :: (Ord v', Eq v, Eq f) => [Rule f v'] -> Strategy f v v'
- innerRewrite :: (Ord v', Eq v, Eq f) => [Rule f v'] -> Strategy f v v'
- rootRewrite :: (Ord v', Eq v, Eq f) => [Rule f v'] -> Strategy f v v'
- module Data.Rewriting.Rules.Ops

# Important operations

fullRewrite :: (Ord v', Eq v, Eq f) => [Rule f v'] -> Strategy f v v' Source #

Full rewriting: Apply rules anywhere in the term.

Reducts are returned in pre-order: the first is a leftmost, outermost redex.

# Reexported modules

A reduct. It contains the resulting term, the position that the term was rewritten at, and the applied rule.

fullRewrite :: (Ord v', Eq v, Eq f) => [Rule f v'] -> Strategy f v v' Source #

Full rewriting: Apply rules anywhere in the term.

Reducts are returned in pre-order: the first is a leftmost, outermost redex.

outerRewrite :: (Ord v', Eq v, Eq f) => [Rule f v'] -> Strategy f v v' Source #

Outer rewriting: Apply rules at outermost redexes.

Reducts are returned in left to right order.

innerRewrite :: (Ord v', Eq v, Eq f) => [Rule f v'] -> Strategy f v v' Source #

Inner rewriting: Apply rules at innermost redexes.

Reducts are returned in left to right order.

rootRewrite :: (Ord v', Eq v, Eq f) => [Rule f v'] -> Strategy f v v' Source #

Root rewriting: Apply rules only at the root of the term.

This is mainly useful as a building block for various rewriting strategies.

module Data.Rewriting.Rules.Ops