yi-core-0.13.4: Yi editor core library

LicenseGPL-2
Maintaineryi-devel@googlegroups.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010
Extensions
  • TemplateHaskell
  • TemplateHaskellQuotes
  • StandaloneDeriving
  • DeriveDataTypeable
  • TypeSynonymInstances
  • FlexibleContexts
  • FlexibleInstances
  • ConstrainedClassMethods
  • MultiParamTypeClasses
  • FunctionalDependencies
  • ExistentialQuantification
  • GeneralizedNewtypeDeriving
  • RankNTypes
  • ExplicitForAll

Yi.Keymap

Contents

Description

Synopsis

Documentation

data Action Source #

Constructors

Show a => YiA (YiM a) 
Show a => EditorA (EditorM a) 
Show a => BufferA (BufferM a) 

type Interact ev a = I ev Action a Source #

data KeymapSet Source #

Constructors

KeymapSet 

Fields

newtype YiM a Source #

The type of user-bindable functions TODO: doc how these are actually user-bindable are they?

Constructors

YiM 

Fields

Instances

Monad YiM Source # 

Methods

(>>=) :: YiM a -> (a -> YiM b) -> YiM b #

(>>) :: YiM a -> YiM b -> YiM b #

return :: a -> YiM a #

fail :: String -> YiM a #

Functor YiM Source # 

Methods

fmap :: (a -> b) -> YiM a -> YiM b #

(<$) :: a -> YiM b -> YiM a #

Applicative YiM Source # 

Methods

pure :: a -> YiM a #

(<*>) :: YiM (a -> b) -> YiM a -> YiM b #

(*>) :: YiM a -> YiM b -> YiM b #

(<*) :: YiM a -> YiM b -> YiM a #

MonadEditor YiM Source # 
MonadReader Yi YiM Source # 

Methods

ask :: YiM Yi #

local :: (Yi -> Yi) -> YiM a -> YiM a #

reader :: (Yi -> a) -> YiM a #

MonadState Editor YiM Source # 

Methods

get :: YiM Editor #

put :: Editor -> YiM () #

state :: (Editor -> (a, Editor)) -> YiM a #

MonadBase IO YiM Source # 

Methods

liftBase :: IO α -> YiM α #

HookType (YiM a) Source # 

Methods

runHookImpl :: YiConfigVariable var => (var -> YiM a) -> YiM a

YiAction (YiM x) x Source # 

Methods

makeAction :: YiM x -> Action Source #

withUI :: (UI Editor -> IO a) -> YiM a Source #

readEditor :: MonadEditor m => (Editor -> a) -> m a Source #

catchDynE :: Exception exception => YiM a -> (exception -> YiM a) -> YiM a Source #

catchJustE Source #

Arguments

:: Exception e 
=> (e -> Maybe b)

Predicate to select exceptions

-> YiM a

Computation to run

-> (b -> YiM a)

Handler

-> YiM a 

handleJustE :: Exception e => (e -> Maybe b) -> (b -> YiM a) -> YiM a -> YiM a Source #

class YiAction a x | a -> x where Source #

Minimal complete definition

makeAction

Methods

makeAction :: Show x => a -> Action Source #

data Yi Source #

Constructors

Yi 

Fields

Instances

MonadReader Yi YiM Source # 

Methods

ask :: YiM Yi #

local :: (Yi -> Yi) -> YiM a -> YiM a #

reader :: (Yi -> a) -> YiM a #

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.

Lenses