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

Language | Haskell98 |

# Documentation

A position in a term. Arguments are counted from 0.

A position describes a path in the tree representation of a term. The empty
position `[]`

denotes the root of the term. A position `[0,1]`

denotes the
2nd child of the 1st child of the root (counting children from left to
right).

# Comparing Positions

Note that positions are not totally ordered. Nevertheless there are some commonly useful comparisons between positions.

above :: Pos -> Pos -> Bool Source #

`p `above` q`

checks whether `p`

is above `q`

(in the tree representation of
a term). A position `p`

is above a position `q`

, whenever `p`

is a prefix of
`q`

.

below :: Pos -> Pos -> Bool Source #

`p `below` q`

checks whether `p`

is below `q`

, that is to say that `q`

is
above `p`

.

parallelTo :: Pos -> Pos -> Bool Source #

`p `parallelTo` q`

checks whether `p`

is parallel to `q`

, that is to say
that `p`

and `q`

do not lie on the same path.