Portability | portable |
---|---|
Stability | experimental |
Maintainer | yi-devel@googlegroups.com |
Safe Haskell | None |
- data Action
- emptyAction :: Action
- type Interact ev a = I ev Action a
- type KeymapM a = Interact Event a
- type Keymap = KeymapM ()
- type KeymapEndo = Keymap -> Keymap
- type KeymapProcess = P Event Action
- data KeymapSet = KeymapSet {}
- topKeymapA :: Lens' KeymapSet Keymap
- insertKeymapA :: Lens' KeymapSet Keymap
- extractTopKeymap :: KeymapSet -> Keymap
- modelessKeymapSet :: Keymap -> KeymapSet
- newtype YiM a = YiM {}
- withUI :: (UI Editor -> IO a) -> YiM a
- unsafeWithEditor :: Config -> MVar YiVar -> EditorM a -> IO a
- readEditor :: MonadEditor m => (Editor -> a) -> m a
- catchDynE :: Exception exception => YiM a -> (exception -> YiM a) -> YiM a
- catchJustE :: Exception e => (e -> Maybe b) -> YiM a -> (b -> YiM a) -> YiM a
- handleJustE :: Exception e => (e -> Maybe b) -> (b -> YiM a) -> YiM a -> YiM a
- class YiAction a x | a -> x where
- makeAction :: Show x => a -> Action
- data Yi = Yi {}
- data IsRefreshNeeded
- data YiVar = YiVar {
- yiEditor :: !Editor
- yiSubprocessIdSupply :: !SubprocessId
- yiSubprocesses :: !(Map SubprocessId SubprocessInfo)
- write :: (MonadInteract m Action ev, YiAction a x, Show x) => a -> m ()
- withModeY :: (forall syntax. Mode syntax -> YiM ()) -> YiM ()
- yiSubprocessesA :: Lens' YiVar (Map SubprocessId SubprocessInfo)
- yiEditorA :: Lens' YiVar Editor
- yiSubprocessIdSupplyA :: Lens' YiVar SubprocessId
- yiConfigA :: Lens' Yi Config
- yiInputA :: Lens' Yi ([Event] -> IO ())
- yiOutputA :: Lens' Yi (IsRefreshNeeded -> [Action] -> IO ())
- yiUiA :: Lens' Yi (UI Editor)
- yiVarA :: Lens' Yi (MVar YiVar)
Documentation
type KeymapEndo = Keymap -> KeymapSource
type KeymapProcess = P Event ActionSource
KeymapSet | |
|
The type of user-bindable functions TODO: doc how these are actually user-bindable are they?
unsafeWithEditor :: Config -> MVar YiVar -> EditorM a -> IO aSource
readEditor :: MonadEditor m => (Editor -> a) -> m aSource
class YiAction a x | a -> x whereSource
makeAction :: Show x => a -> ActionSource
Typeable Yi | |
MonadReader Yi YiM |
YiVar | |
|
write :: (MonadInteract m Action ev, YiAction a x, Show x) => a -> m ()Source
write a
returns a keymap that just outputs the action a
.
withModeY :: (forall syntax. Mode syntax -> YiM ()) -> YiM ()Source
withModeY f
runs f
on the current buffer's mode. As this runs in
the YiM monad, we're able to do more than with just withModeB
such as
prompt the user for something before running the action.