yi-core-0.13.5: Yi editor core library

LicenseGPL-2
Maintaineryi-devel@googlegroups.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010
Extensions
  • Cpp
  • ScopedTypeVariables
  • DeriveDataTypeable
  • DeriveFunctor
  • DeriveTraversable
  • DeriveFoldable
  • FlexibleContexts
  • ConstrainedClassMethods
  • MultiParamTypeClasses
  • ExistentialQuantification
  • GeneralizedNewtypeDeriving
  • ExplicitForAll
  • LambdaCase

Yi.Types

Description

This module is the host of the most prevalent types throughout Yi. It is unfortunately a necessary evil to avoid use of bootfiles.

You're encouraged to import from more idiomatic modules which will re-export these where appropriate.

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 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 #

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 #

data KeymapSet Source #

Constructors

KeymapSet 

Fields

newtype BufferM a Source #

The BufferM monad writes the updates performed.

Constructors

BufferM 

Instances

Monad BufferM Source # 

Methods

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

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

return :: a -> BufferM a #

fail :: String -> BufferM a #

Functor BufferM Source # 

Methods

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

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

Applicative BufferM Source # 

Methods

pure :: a -> BufferM a #

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

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

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

MonadReader Window BufferM Source # 

Methods

ask :: BufferM Window #

local :: (Window -> Window) -> BufferM a -> BufferM a #

reader :: (Window -> a) -> BufferM a #

MonadState FBuffer BufferM Source # 

Methods

get :: BufferM FBuffer #

put :: FBuffer -> BufferM () #

state :: (FBuffer -> (a, FBuffer)) -> BufferM a #

MonadWriter [Update] BufferM Source # 

Methods

writer :: (a, [Update]) -> BufferM a #

tell :: [Update] -> BufferM () #

listen :: BufferM a -> BufferM (a, [Update]) #

pass :: BufferM (a, [Update] -> [Update]) -> BufferM a #

YiAction (BufferM x) x Source # 

data IndentSettings Source #

Currently duplicates some of Vim's indent settings. Allowing a buffer to specify settings that are more dynamic, perhaps via closures, could be useful.

Constructors

IndentSettings 

Fields

data FBuffer Source #

Constructors

FBuffer 

Fields

data MarkSet a Source #

Constructors

MarkSet 

Fields

Instances

Functor MarkSet Source # 

Methods

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

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

Foldable MarkSet Source # 

Methods

fold :: Monoid m => MarkSet m -> m #

foldMap :: Monoid m => (a -> m) -> MarkSet a -> m #

foldr :: (a -> b -> b) -> b -> MarkSet a -> b #

foldr' :: (a -> b -> b) -> b -> MarkSet a -> b #

foldl :: (b -> a -> b) -> b -> MarkSet a -> b #

foldl' :: (b -> a -> b) -> b -> MarkSet a -> b #

foldr1 :: (a -> a -> a) -> MarkSet a -> a #

foldl1 :: (a -> a -> a) -> MarkSet a -> a #

toList :: MarkSet a -> [a] #

null :: MarkSet a -> Bool #

length :: MarkSet a -> Int #

elem :: Eq a => a -> MarkSet a -> Bool #

maximum :: Ord a => MarkSet a -> a #

minimum :: Ord a => MarkSet a -> a #

sum :: Num a => MarkSet a -> a #

product :: Num a => MarkSet a -> a #

Traversable MarkSet Source # 

Methods

traverse :: Applicative f => (a -> f b) -> MarkSet a -> f (MarkSet b) #

sequenceA :: Applicative f => MarkSet (f a) -> f (MarkSet a) #

mapM :: Monad m => (a -> m b) -> MarkSet a -> m (MarkSet b) #

sequence :: Monad m => MarkSet (m a) -> m (MarkSet a) #

Binary a => Binary (MarkSet a) Source # 

Methods

put :: MarkSet a -> Put #

get :: Get (MarkSet a) #

putList :: [MarkSet a] -> Put #

data Attributes Source #

Constructors

Attributes 

Fields

data AnyMode Source #

Constructors

AnyMode (Mode syntax) 

data Mode syntax Source #

A Mode customizes the Yi interface for editing a particular data format. It specifies when the mode should be used and controls file-specific syntax highlighting and command input, among other things.

Constructors

Mode 

Fields

data IndentBehaviour Source #

Used to specify the behaviour of the automatic indent command.

Constructors

IncreaseCycle

Increase the indentation to the next higher indentation hint. If we are currently at the highest level of indentation then cycle back to the lowest.

DecreaseCycle

Decrease the indentation to the next smaller indentation hint. If we are currently at the smallest level then cycle back to the largest

IncreaseOnly

Increase the indentation to the next higher hint if no such hint exists do nothing.

DecreaseOnly

Decrease the indentation to the next smaller indentation hint, if no such hint exists do nothing.

type Statuses = DelayList Status Source #

data Editor Source #

The Editor state

Constructors

Editor 

Fields

Instances

MonadState Editor EditorM Source # 

Methods

get :: EditorM Editor #

put :: Editor -> EditorM () #

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

MonadState Editor YiM Source # 

Methods

get :: YiM Editor #

put :: Editor -> YiM () #

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

newtype EditorM a Source #

Constructors

EditorM 

Instances

Monad EditorM Source # 

Methods

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

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

return :: a -> EditorM a #

fail :: String -> EditorM a #

Functor EditorM Source # 

Methods

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

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

Applicative EditorM Source # 

Methods

pure :: a -> EditorM a #

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

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

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

MonadEditor EditorM Source # 
MonadReader Config EditorM Source # 

Methods

ask :: EditorM Config #

local :: (Config -> Config) -> EditorM a -> EditorM a #

reader :: (Config -> a) -> EditorM a #

MonadState Editor EditorM Source # 

Methods

get :: EditorM Editor #

put :: Editor -> EditorM () #

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

HookType (EditorM a) Source # 

Methods

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

YiAction (EditorM x) x Source # 

data UIConfig Source #

Constructors

UIConfig 

Fields

type UIBoot = Config -> ([Event] -> IO ()) -> ([Action] -> IO ()) -> Editor -> IO (UI Editor) Source #

data CursorStyle Source #

When should we use a "fat" cursor (i.e. 2 pixels wide, rather than 1)? Fat cursors have only been implemented for the Pango frontend.

data Config Source #

Configuration record. All Yi hooks can be set here.

Constructors

Config 

Fields

Instances