Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Hook = Hook a
- type Hooks = Map TypeRep [Hook]
- newtype Action a = Action {}
- execAction :: ActionState -> Hooks -> Action () -> IO ActionState
- evalAction :: ActionState -> Hooks -> Action a -> IO a
- type AsyncAction = Async (Action ())
- data ActionState = ActionState {
- _ed :: Editor
- _asyncs :: [AsyncAction]
- class HasActionState c where
- newtype BufAction a = BufAction {}
- liftBuf :: BufAction a -> BufRef -> Action (Maybe a)
Documentation
This is a monad-transformer stack for performing actions against the editor.
You register Actions to be run in response to events using eventListener
Within an Action you can:
execAction :: ActionState -> Hooks -> Action () -> IO ActionState Source #
Unwrap and execute an Action (returning the editor state)
evalAction :: ActionState -> Hooks -> Action a -> IO a Source #
Unwrap and evaluate an Action (returning the value)
type AsyncAction = Async (Action ()) Source #
data ActionState Source #
ActionState | |
|
class HasActionState c where Source #