| Copyright | (c) 2010-12 Benedikt Schmidt |
|---|---|
| License | GPL v3 (see LICENSE) |
| Maintainer | Benedikt Schmidt <beschmi@gmail.com> |
| Safe Haskell | None |
| Language | Haskell98 |
Term.Positions
Description
Positions and replacement in terms.
Documentation
replacePos :: Ord a => Term a -> (Term a, Position) -> Term a #
t returns the term replacePos (s,p)t' where the subterm at position p
is replaced by s. The standard notation for t is replacePos (s,p)t[s]_p.
replacePos accounts for AC symbols in the same ways as atPos.
FIXME: The AC can be optimized.
positionsNonVar :: VTerm a b -> [Position] #
positionsNonVar t returns all the non-variable positions in the term t.
positionsNonVar accounts for AC symbols in the same ways as atPos.