Maintainer | Benedikt Schmidt <beschmi@gmail.com> |
---|---|

Safe Haskell | None |

Positions and replacement in terms.

# Documentation

replacePos :: Ord a => Term a -> (Term a, Position) -> Term aSource

`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 :: (Show a, Show b) => VTerm a b -> [Position]Source

`positionsNonVar t`

returns all the non-variable positions in the term `t`

.
`positionsNonVar`

accounts for AC symbols in the same ways as `atPos`

.