Hedi-0.1.1: Line oriented editorSource codeContentsIndex
Offset
Description
Operations involving Offset and Range through an Engine
Synopsis
jumpE :: Ctx m => Offset -> Editor m Engine
rangeResolve :: Ctx m => Range -> Editor m (Int, Engine)
doOffset :: Ctx m => Offset -> (a -> Editor m b) -> (Engine -> Maybe a) -> Editor m b
editOffset :: Ctx m => Offset -> (Engine -> Maybe Engine) -> Editor m ()
doRange :: Ctx m => Range -> (a -> Editor m b) -> (Int -> Engine -> Maybe a) -> Editor m b
editRange :: Ctx m => Range -> (Int -> Engine -> Maybe Engine) -> Editor m ()
Documentation
jumpESource
:: Ctx m
=> Offsetthe new position for the cursor
-> Editor m Enginethe modified engine under the Editor
move the cursor in the engine
rangeResolveSource
:: Ctx m
=> Rangethe range to focus
-> Editor m (Int, Engine)the tuple (nelements,engine placed at first offset of range)
From a range to the tuple (nelements,starting range element)
doOffsetSource
:: Ctx m
=> OffsetOffset for the action
-> a -> Editor m bthe final action
-> Engine -> Maybe athe backend ation
-> Editor m b..
a complete backend + Editor action on an Offset
editOffsetSource
:: Ctx m
=> OffsetOffset for the backend action
-> Engine -> Maybe Enginethe backend ation
-> Editor m ()modified monad
a backend action ending in a save state for the file
doRangeSource
:: Ctx m
=> Rangethe addressed range
-> a -> Editor m bthe closing Editor action
-> Int -> Engine -> Maybe athe backend action
-> Editor m b...
a complete backend + Editor action on a Range
editRangeSource
:: Ctx m
=> Rangethe addressed range
-> Int -> Engine -> Maybe Enginethe backend action
-> Editor m ()modified monad
Produced by Haddock version 2.3.0