Safe Haskell | None |
---|---|
Language | Haskell2010 |
Yi.Buffer.Basic
Description
Basic types useful everywhere we play with buffers.
Synopsis
- data Direction
- reverseDir :: Direction -> Direction
- mayReverse :: Direction -> [a] -> [a]
- directionElim :: Direction -> a -> a -> a
- newtype Mark = Mark {
- markId :: Int
- newtype BufferRef = BufferRef Int
- newtype Point = Point {
- fromPoint :: Int
- newtype Size = Size {
- fromSize :: Int
- newtype WindowRef = WindowRef {
- unWindowRef :: Int
Documentation
Direction of movement inside a buffer
Instances
Bounded Direction Source # | |
Defined in Yi.Buffer.Basic | |
Enum Direction Source # | |
Defined in Yi.Buffer.Basic | |
Eq Direction Source # | |
Ord Direction Source # | |
Defined in Yi.Buffer.Basic | |
Show Direction Source # | |
Generic Direction Source # | |
Binary Direction Source # | |
type Rep Direction Source # | |
Defined in Yi.Buffer.Basic type Rep Direction = D1 ('MetaData "Direction" "Yi.Buffer.Basic" "yi-language-0.18.0-DKcd9oMzmbR2TO3TPLJtmH" 'False) (C1 ('MetaCons "Backward" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Forward" 'PrefixI 'False) (U1 :: Type -> Type)) |
reverseDir :: Direction -> Direction Source #
mayReverse :: Direction -> [a] -> [a] Source #
reverse if Backward
directionElim :: Direction -> a -> a -> a Source #
direction
is in the same style of maybe
or either
functions,
It takes one argument per direction (backward, then forward) and a
direction to select the output.
A mark in a buffer
Reference to a buffer.
Constructors
BufferRef Int |
A point in a buffer
Instances
Bounded Point Source # | |
Defined in Yi.Buffer.Basic | |
Enum Point Source # | |
Eq Point Source # | |
Integral Point Source # | |
Num Point Source # | |
Ord Point Source # | |
Real Point Source # | |
Defined in Yi.Buffer.Basic Methods toRational :: Point -> Rational | |
Show Point Source # | |
Ix Point Source # | |
Binary Point Source # | |
SemiNum Point Size Source # | |
Size of a buffer region
Window references
Constructors
WindowRef | |
Fields
|
Instances
Enum WindowRef Source # | |
Defined in Yi.Buffer.Basic | |
Eq WindowRef Source # | |
Ord WindowRef Source # | |
Defined in Yi.Buffer.Basic | |
Show WindowRef Source # | |
Default WindowRef Source # | |
Defined in Yi.Buffer.Basic | |
Binary WindowRef Source # | |