coda-0.0.1: The coda compiler

Copyright(c) Edward Kmett 2017
LicenseBSD2
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Coda.Relative.Delta.Type

Description

Stuff we an measure in UTF-16 code units

Synopsis

Documentation

newtype Delta Source #

A count of UTF-16 code-units.

This forms an (obvious) Abelian group unlike the merely monoidal pairs of line and column.

It is also very compact fitting in a single Int.

Constructors

Delta Int 

Instances

Eq Delta Source # 

Methods

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

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

Data Delta Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Delta -> c Delta #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Delta #

toConstr :: Delta -> Constr #

dataTypeOf :: Delta -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Delta) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Delta) #

gmapT :: (forall b. Data b => b -> b) -> Delta -> Delta #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Delta -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Delta -> r #

gmapQ :: (forall d. Data d => d -> u) -> Delta -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Delta -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Delta -> m Delta #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Delta -> m Delta #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Delta -> m Delta #

Num Delta Source # 
Ord Delta Source # 

Methods

compare :: Delta -> Delta -> Ordering #

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

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

(>) :: Delta -> Delta -> Bool #

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

max :: Delta -> Delta -> Delta #

min :: Delta -> Delta -> Delta #

Read Delta Source # 
Show Delta Source # 

Methods

showsPrec :: Int -> Delta -> ShowS #

show :: Delta -> String #

showList :: [Delta] -> ShowS #

Generic Delta Source # 

Associated Types

type Rep Delta :: * -> * #

Methods

from :: Delta -> Rep Delta x #

to :: Rep Delta x -> Delta #

Semigroup Delta Source # 

Methods

(<>) :: Delta -> Delta -> Delta #

sconcat :: NonEmpty Delta -> Delta #

stimes :: Integral b => b -> Delta -> Delta #

Monoid Delta Source # 

Methods

mempty :: Delta #

mappend :: Delta -> Delta -> Delta #

mconcat :: [Delta] -> Delta #

Hashable Delta Source # 

Methods

hashWithSalt :: Int -> Delta -> Int #

hash :: Delta -> Int #

Default Delta Source # 

Methods

def :: Delta

StrictRelativeOrder Delta Source # 
RelativeOrder Delta Source # 
RelativeMonoid Delta Source # 
Relative Delta Source # 

Methods

rel :: Delta -> Delta -> Delta Source #

Measured Delta Source # 

Associated Types

type Measure Delta :: * Source #

HasRelativeDelta Delta Source # 
HasOrderedDelta Delta Source # 
HasMonoidalDelta Delta Source # 
HasDelta Delta Source # 

Methods

delta :: Delta -> Delta Source #

OrderedMonoid Delta Source # 
Changeable Delta Source #

O(log(min(k,n-k))) where there are n edits, k of which occur before the position in question

Editable Delta Source # 

Methods

edit :: Edit -> Delta -> Partial Delta Source #

PP Delta Source # 

Methods

pp :: Delta -> (String, String) Source #

Splittable Delta Source # 
Inverse Delta Source # 
Composable Delta Source # 
MonadWriter Delta Located # 

Methods

writer :: (a, Delta) -> Located a #

tell :: Delta -> Located () #

listen :: Located a -> Located (a, Delta) #

pass :: Located (a, Delta -> Delta) -> Located a #

type Rep Delta Source # 
type Rep Delta = D1 * (MetaData "Delta" "Coda.Relative.Delta.Type" "coda-0.0.1-Lrfl9CggVgIC7W2mVql1dH" True) (C1 * (MetaCons "Delta" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Int)))
type Measure Delta Source # 
type Idempotent Delta Source #