Offset
Description
Operations involving Offset and Range through Engine interface
- jumpE :: Ctx m w => Offset -> Editor m w w
- rangeResolve :: Ctx m w => Range -> Editor m w (Int, w)
- doOffset :: Ctx m w => Offset -> (a -> Editor m w b) -> (w -> Maybe a) -> Editor m w b
- editOffset :: Ctx m w => Offset -> (w -> Maybe w) -> Editor m w ()
- doRange :: Ctx m w => Range -> (a -> Editor m w b) -> (Int -> w -> Maybe a) -> Editor m w b
- editRange :: Ctx m w => Range -> (Int -> w -> Maybe w) -> Editor m w ()
Documentation
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
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)
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
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