Maintainer | bastiaan.heeren@ou.nl |
---|---|
Stability | provisional |
Portability | portable (depends on ghc) |
Safe Haskell | None |
Language | Haskell98 |
- data Location
- toLocation :: [Int] -> Location
- fromLocation :: Location -> [Int]
- class Navigator a where
- isTop :: Navigator a => a -> Bool
- isLeaf :: Navigator a => a -> Bool
- hasLeft :: Navigator a => a -> Bool
- hasRight :: Navigator a => a -> Bool
- hasUp :: Navigator a => a -> Bool
- hasDown :: Navigator a => a -> Bool
- top :: Navigator a => a -> a
- leftMost :: Navigator a => a -> a
- rightMost :: Navigator a => a -> a
- leftMostLeaf :: Navigator a => a -> a
- rightMostLeaf :: Navigator a => a -> a
- depth :: Navigator a => a -> Int
- level :: Navigator a => a -> Int
- levelNext :: Navigator a => a -> Maybe a
- levelPrevious :: Navigator a => a -> Maybe a
- leftMostAt :: Navigator a => Int -> a -> Maybe a
- rightMostAt :: Navigator a => Int -> a -> Maybe a
- downs :: Navigator a => a -> [a]
- downTo :: Navigator a => Int -> a -> Maybe a
- arity :: Navigator a => a -> Int
- navigateTo :: Navigator a => Location -> a -> Maybe a
- navigateTowards :: Navigator a => Location -> a -> a
- data PreOrder a
- makePreOrder :: a -> PreOrder a
- data PostOrder a
- makePostOrder :: a -> PostOrder a
- data LevelOrder a
- makeLevelOrder :: a -> LevelOrder a
- data Horizontal a
- makeHorizontal :: a -> Horizontal a
- data Leafs a
- makeLeafs :: Navigator a => a -> Leafs a
- data UniplateNavigator a
Location information
toLocation :: [Int] -> Location Source
fromLocation :: Location -> [Int] Source
Navigator type class
class Navigator a where Source
For a minimal complete definition, provide an implemention for downs or allDowns. All other functions need an implementation as well, except for change. Note that a constructor (a -> f a) is not included in the type class to allow additional type class constraints on type a.
leftMostLeaf :: Navigator a => a -> a Source
rightMostLeaf :: Navigator a => a -> a Source
levelPrevious :: Navigator a => a -> Maybe a Source
leftMostAt :: Navigator a => Int -> a -> Maybe a Source
rightMostAt :: Navigator a => Int -> a -> Maybe a Source
navigateTo :: Navigator a => Location -> a -> Maybe a Source
navigateTowards :: Navigator a => Location -> a -> a Source
Tree walks
makePreOrder :: a -> PreOrder a Source
makePostOrder :: a -> PostOrder a Source
data LevelOrder a Source
Wrapper LevelOrder | |
Update LevelOrder | |
Eq a => Eq (LevelOrder a) | |
Show a => Show (LevelOrder a) | |
Navigator a => Iterator (LevelOrder a) |
makeLevelOrder :: a -> LevelOrder a Source
data Horizontal a Source
Wrapper Horizontal | |
Update Horizontal | |
Eq a => Eq (Horizontal a) | |
Show a => Show (Horizontal a) | |
Navigator a => Iterator (Horizontal a) |
makeHorizontal :: a -> Horizontal a Source
Uniplate navigator
data UniplateNavigator a Source