ideas-1.3.1: 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 
Update Leafs 
Eq a => Eq (Leafs a) 
Show a => Show (Leafs a) 
Navigator a => Iterator (Leafs a) 

Uniplate navigator