Hedi-0.1: Line oriented editor

Offset

Description

Operations involving Offset and Range through Engine interface

Synopsis

Documentation

jumpESource

Arguments

:: Ctx m w 
=> Offset

the new position for the cursor

-> Editor m w w

the modified engine under the Editor

move the cursor in the engine

rangeResolveSource

Arguments

:: Ctx m w 
=> Range

the range to focus

-> Editor m w (Int, w)

the tuple (nelements,engine placed at first offset of range)

From a range to the tuple (nelements,starting range element)

doOffsetSource

Arguments

:: Ctx m w 
=> Offset

Offset for the action

-> (a -> Editor m w b)

the final action

-> (w -> Maybe a)

the backend ation

-> Editor m w b

..

a complete backend + Editor action on an Offset

editOffsetSource

Arguments

:: Ctx m w 
=> Offset

Offset for the backend action

-> (w -> Maybe w)

the backend ation

-> Editor m w ()

modified monad

a backend action ending in a save state for the file

doRangeSource

Arguments

:: Ctx m w 
=> Range

the addressed range

-> (a -> Editor m w b)

the closing Editor action

-> (Int -> w -> Maybe a)

the backend action

-> Editor m w b

...

a complete backend + Editor action on a Range

editRangeSource

Arguments

:: Ctx m w 
=> Range

the addressed range

-> (Int -> w -> Maybe w)

the backend action

-> Editor m w ()

modified monad