ideas-1.6: Feedback services for intelligent tutoring systems

Maintainerbastiaan.heeren@ou.nl
Stabilityprovisional
Portabilityportable (depends on ghc)
Safe HaskellNone
LanguageHaskell98

Ideas.Common.Traversal.Navigator

Contents

Description

 

Synopsis

Location information

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.

Minimal complete definition

up, down, left, right

Methods

up :: a -> Maybe a Source #

down :: a -> Maybe a Source #

downLast :: a -> Maybe a Source #

left :: a -> Maybe a Source #

right :: a -> Maybe a Source #

childnr :: a -> Int Source #

location :: a -> Location Source #

isTop :: Navigator a => a -> Bool Source #

hasUp :: Navigator a => a -> Bool Source #

top :: Navigator a => a -> a Source #

leftMost :: Navigator a => a -> a Source #

rightMost :: Navigator a => a -> a Source #

depth :: Navigator a => a -> Int Source #

level :: Navigator a => a -> Int Source #

leftMostAt :: Navigator a => Int -> a -> Maybe a Source #

downs :: Navigator a => a -> [a] Source #

downTo :: Navigator a => Int -> a -> Maybe a Source #

arity :: Navigator a => a -> Int Source #

Tree walks

data Leafs a Source #

Instances

Wrapper Leafs Source # 

Methods

wrap :: a -> Leafs a Source #

unwrap :: Leafs a -> a Source #

Update Leafs Source # 

Methods

update :: Leafs a -> (a, a -> Leafs a) Source #

Eq a => Eq (Leafs a) Source # 

Methods

(==) :: Leafs a -> Leafs a -> Bool #

(/=) :: Leafs a -> Leafs a -> Bool #

Show a => Show (Leafs a) Source # 

Methods

showsPrec :: Int -> Leafs a -> ShowS #

show :: Leafs a -> String #

showList :: [Leafs a] -> ShowS #

Navigator a => Iterator (Leafs a) Source # 

Uniplate navigator

data UniplateNavigator a Source #

Instances

Update UniplateNavigator Source # 
(Eq a, Uniplate a) => Eq (UniplateNavigator a) Source # 
(Show a, Uniplate a) => Show (UniplateNavigator a) Source # 
(Arbitrary a, Uniplate a) => Arbitrary (UniplateNavigator a) Source # 
Uniplate a => Focus (UniplateNavigator a) Source # 
Uniplate a => Navigator (UniplateNavigator a) Source # 
type Unfocus (UniplateNavigator a) Source #