CLASE-2009.2.11: Cursor Library for A Structured Editor

Data.Cursor.CLASE.Language

Documentation

data Up Source

type family Invert d :: *Source

data DirectionT a whereSource

Constructors

UpT :: DirectionT Up 
DownT :: DirectionT Down 

class Reify l a whereSource

Methods

reify :: a -> TypeRep l aSource

data ExistsR l r whereSource

Constructors

ExistsR :: Reify l a => r a -> ExistsR l r 

class Language l whereSource

Associated Types

data Context l :: * -> * -> *Source

data Movement l :: * -> * -> * -> *Source

data TypeRep l :: * -> *Source

contextMovementEq :: Language l => Context l a b -> Movement l Up a c -> Maybe (TyEq b c)Source

data Path l r a b whereSource

Constructors

Stop :: Path l r a a 
Step :: Reify l b => r a b -> Path l r b c -> Path l r a c 

foldPath :: (forall from to. Reify l to => r from to -> from -> to) -> start -> Path l r start finish -> finishSource

data Cursor l x a Source

Constructors

Reify l a => Cursor 

Fields

it :: a
 
ctx :: Path l (Context l) a l
 
log :: Route l a x
 

data CursorWithMovement l d x from whereSource

Constructors

CWM :: Reify l to => Cursor l x to -> Movement l d from to -> CursorWithMovement l d x from 

rebuild :: Language l => Cursor l x a -> lSource

applyMovement :: (Language l, Reify l a, Reify l b) => Movement l d a b -> Cursor l x a -> Maybe (Cursor l x b)Source

genericMoveSideways :: forall l x a. Language l => (forall a z. Movement l Down a z -> Maybe (ExistsR l (Movement l Down a))) -> Cursor l x a -> Maybe (ExistsR l (Cursor l x))Source

moveToRoot :: Language l => Cursor l x a -> Cursor l x lSource

data Route l from to whereSource

Constructors

Route :: Reify l mid => Path l (Movement l Up) from mid -> Path l (Movement l Down) mid to -> Route l from to 

route_invariant :: forall l from to. Language l => Route l from to -> BoolSource

updateRoute :: (Language l, Reify l a, Reify l b) => Movement l d a b -> Route l a c -> Route l b cSource

resetLog :: Cursor l x a -> Cursor l a aSource

appendRoute :: (Language l, Reify l a, Reify l b, Reify l c) => Route l a b -> Route l b c -> Route l a cSource

followRoute :: Language l => Cursor l x a -> Route l a c -> Maybe (Cursor l x c)Source