Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype BufAction a = BufAction {
- getBufAction :: Free BufActionF a
- getText :: BufAction YiString
- setText :: YiString -> BufAction ()
- getBufRef :: BufAction BufRef
- getRange :: CrdRange -> BufAction YiString
- setRange :: CrdRange -> YiString -> BufAction ()
- getBufExt :: (Typeable ext, Show ext, Default ext) => BufAction ext
- setBufExt :: (Typeable ext, Show ext, Default ext) => ext -> BufAction ()
- overBufExt :: (Typeable ext, Show ext, Default ext) => (ext -> ext) -> BufAction ()
- liftAction :: Action r -> BufAction r
Documentation
This is a monad for performing actions on a specific buffer.
You run BufAction
s by embedding them in a Action
via bufferDo
or
buffersDo
Within a BufAction you can:
- Use
liftAction
to run anAction
- Use liftIO for IO
- Access/Edit the buffer's text; some commands are available in Rasa.Internal.Actions.
- Access/edit buffer extensions; see
bufExt
- Embed and sequence
BufAction
s from other extensions
getBufExt :: (Typeable ext, Show ext, Default ext) => BufAction ext Source #
Retrieve some buffer extension state
setBufExt :: (Typeable ext, Show ext, Default ext) => ext -> BufAction () Source #
Set some buffer extension state