Portability | portable |
---|---|
Stability | experimental |
Maintainer | Uwe Schmidt (uwe\@fh-wedel.de) |
Safe Haskell | Safe-Inferred |
Interface definition for navigatable trees. Navigatable trees need to have operations to move up, down, left and right. With these elementary operations, most of the XPath axises can be defined.
- class NavigatableTree t where
- class NavigatableTreeToTree nt t | t -> nt, nt -> t where
- class NavigatableTreeModify nt t | t -> nt, nt -> t where
- addTreeLeft :: t a -> nt a -> Maybe (nt a)
- addTreeRight :: t a -> nt a -> Maybe (nt a)
- dropTreeLeft :: nt a -> Maybe (nt a)
- dropTreeRight :: nt a -> Maybe (nt a)
- substThisTree :: t a -> nt a -> nt a
Documentation
class NavigatableTree t whereSource
The interface for navigatable trees
mvUp :: t a -> Maybe (t a)Source
move one step towards the root
mvDown :: t a -> Maybe (t a)Source
descend one step to the leftmost child
mvLeft :: t a -> Maybe (t a)Source
move to the left neighbour
mvRight :: t a -> Maybe (t a)Source
move to the right neighbour
class NavigatableTreeToTree nt t | t -> nt, nt -> t whereSource
Conversion between trees and navigatable trees,
There is only a single navigatable tree implementation for a given tree allowed (see the functional dependencies)
construct a navigatable tree
remove navigation
class NavigatableTreeModify nt t | t -> nt, nt -> t whereSource
Edit operation on navigatable trees
There is only a single navigatable tree implementation for a given tree allowed (see the functional dependencies)
addTreeLeft :: t a -> nt a -> Maybe (nt a)Source
add an ordinary tree in front of the given navigatable tree
addTreeRight :: t a -> nt a -> Maybe (nt a)Source
add an ordinary tree behind of the given navigatable tree
dropTreeLeft :: nt a -> Maybe (nt a)Source
drop the direct left sibling tree of the given navigatable tree
dropTreeRight :: nt a -> Maybe (nt a)Source
drop the direct right sibling tree of the given navigatable tree
substThisTree :: t a -> nt a -> nt aSource
change the tree but remain the navigation