yi-language-0.14.1: Collection of language-related Yi libraries.

Safe HaskellNone
LanguageHaskell2010

Yi.Buffer.Basic

Description

Basic types useful everywhere we play with buffers.

Synopsis

Documentation

data Direction Source #

Direction of movement inside a buffer

Constructors

Backward 
Forward 

Instances

Bounded Direction Source # 
Enum Direction Source # 
Eq Direction Source # 
Ord Direction Source # 
Show Direction Source # 
Generic Direction Source # 

Associated Types

type Rep Direction :: * -> * #

Binary Direction Source # 
type Rep Direction Source # 
type Rep Direction = D1 (MetaData "Direction" "Yi.Buffer.Basic" "yi-language-0.14.1-CfiKJEbT4jZIda4r6aEAGr" False) ((:+:) (C1 (MetaCons "Backward" PrefixI False) U1) (C1 (MetaCons "Forward" PrefixI False) U1))

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.

newtype Mark Source #

A mark in a buffer

Constructors

Mark 

Fields

Instances

Eq Mark Source # 

Methods

(==) :: Mark -> Mark -> Bool #

(/=) :: Mark -> Mark -> Bool #

Ord Mark Source # 

Methods

compare :: Mark -> Mark -> Ordering #

(<) :: Mark -> Mark -> Bool #

(<=) :: Mark -> Mark -> Bool #

(>) :: Mark -> Mark -> Bool #

(>=) :: Mark -> Mark -> Bool #

max :: Mark -> Mark -> Mark #

min :: Mark -> Mark -> Mark #

Show Mark Source # 

Methods

showsPrec :: Int -> Mark -> ShowS #

show :: Mark -> String #

showList :: [Mark] -> ShowS #

Binary Mark Source # 

Methods

put :: Mark -> Put #

get :: Get Mark #

putList :: [Mark] -> Put #

newtype Point Source #

A point in a buffer

Constructors

Point 

Fields

Instances

Bounded Point Source # 
Enum Point Source # 
Eq Point Source # 

Methods

(==) :: Point -> Point -> Bool #

(/=) :: Point -> Point -> Bool #

Integral Point Source # 
Num Point Source # 
Ord Point Source # 

Methods

compare :: Point -> Point -> Ordering #

(<) :: Point -> Point -> Bool #

(<=) :: Point -> Point -> Bool #

(>) :: Point -> Point -> Bool #

(>=) :: Point -> Point -> Bool #

max :: Point -> Point -> Point #

min :: Point -> Point -> Point #

Real Point Source # 

Methods

toRational :: Point -> Rational #

Show Point Source # 

Methods

showsPrec :: Int -> Point -> ShowS #

show :: Point -> String #

showList :: [Point] -> ShowS #

Ix Point Source # 
Binary Point Source # 

Methods

put :: Point -> Put #

get :: Get Point #

putList :: [Point] -> Put #

SemiNum Point Size Source # 

newtype Size Source #

Size of a buffer region

Constructors

Size 

Fields

Instances

Enum Size Source # 

Methods

succ :: Size -> Size #

pred :: Size -> Size #

toEnum :: Int -> Size #

fromEnum :: Size -> Int #

enumFrom :: Size -> [Size] #

enumFromThen :: Size -> Size -> [Size] #

enumFromTo :: Size -> Size -> [Size] #

enumFromThenTo :: Size -> Size -> Size -> [Size] #

Eq Size Source # 

Methods

(==) :: Size -> Size -> Bool #

(/=) :: Size -> Size -> Bool #

Integral Size Source # 

Methods

quot :: Size -> Size -> Size #

rem :: Size -> Size -> Size #

div :: Size -> Size -> Size #

mod :: Size -> Size -> Size #

quotRem :: Size -> Size -> (Size, Size) #

divMod :: Size -> Size -> (Size, Size) #

toInteger :: Size -> Integer #

Num Size Source # 

Methods

(+) :: Size -> Size -> Size #

(-) :: Size -> Size -> Size #

(*) :: Size -> Size -> Size #

negate :: Size -> Size #

abs :: Size -> Size #

signum :: Size -> Size #

fromInteger :: Integer -> Size #

Ord Size Source # 

Methods

compare :: Size -> Size -> Ordering #

(<) :: Size -> Size -> Bool #

(<=) :: Size -> Size -> Bool #

(>) :: Size -> Size -> Bool #

(>=) :: Size -> Size -> Bool #

max :: Size -> Size -> Size #

min :: Size -> Size -> Size #

Real Size Source # 

Methods

toRational :: Size -> Rational #

Show Size Source # 

Methods

showsPrec :: Int -> Size -> ShowS #

show :: Size -> String #

showList :: [Size] -> ShowS #

Binary Size Source # 

Methods

put :: Size -> Put #

get :: Get Size #

putList :: [Size] -> Put #

SemiNum Point Size Source #