rope-utf16-splay-0.3.1.0: Ropes optimised for updating using UTF-16 code units and row/column pairs.

Safe HaskellSafe
LanguageHaskell2010

Data.SplayTree

Contents

Synopsis

Documentation

class Monoid v => Measured v a | a -> v where Source #

Methods

measure :: a -> v Source #

Instances
Measured Position Rope Source # 
Instance details

Defined in Data.Rope.UTF16.Internal

Measured Position Chunk Source # 
Instance details

Defined in Data.Rope.UTF16.Internal

Measured v a => Measured v (SplayTree v a) Source # 
Instance details

Defined in Data.SplayTree

Methods

measure :: SplayTree v a -> v Source #

data SplayTree v a Source #

Constructors

Leaf 
Fork (SplayTree v a) a (SplayTree v a) !v

Cached measure of the whole node

Instances
Measured v a => Measured v (SplayTree v a) Source # 
Instance details

Defined in Data.SplayTree

Methods

measure :: SplayTree v a -> v Source #

Foldable (SplayTree v) Source # 
Instance details

Defined in Data.SplayTree

Methods

fold :: Monoid m => SplayTree v m -> m #

foldMap :: Monoid m => (a -> m) -> SplayTree v a -> m #

foldr :: (a -> b -> b) -> b -> SplayTree v a -> b #

foldr' :: (a -> b -> b) -> b -> SplayTree v a -> b #

foldl :: (b -> a -> b) -> b -> SplayTree v a -> b #

foldl' :: (b -> a -> b) -> b -> SplayTree v a -> b #

foldr1 :: (a -> a -> a) -> SplayTree v a -> a #

foldl1 :: (a -> a -> a) -> SplayTree v a -> a #

toList :: SplayTree v a -> [a] #

null :: SplayTree v a -> Bool #

length :: SplayTree v a -> Int #

elem :: Eq a => a -> SplayTree v a -> Bool #

maximum :: Ord a => SplayTree v a -> a #

minimum :: Ord a => SplayTree v a -> a #

sum :: Num a => SplayTree v a -> a #

product :: Num a => SplayTree v a -> a #

(Eq a, Eq v) => Eq (SplayTree v a) Source # 
Instance details

Defined in Data.SplayTree

Methods

(==) :: SplayTree v a -> SplayTree v a -> Bool #

(/=) :: SplayTree v a -> SplayTree v a -> Bool #

(Ord a, Ord v) => Ord (SplayTree v a) Source # 
Instance details

Defined in Data.SplayTree

Methods

compare :: SplayTree v a -> SplayTree v a -> Ordering #

(<) :: SplayTree v a -> SplayTree v a -> Bool #

(<=) :: SplayTree v a -> SplayTree v a -> Bool #

(>) :: SplayTree v a -> SplayTree v a -> Bool #

(>=) :: SplayTree v a -> SplayTree v a -> Bool #

max :: SplayTree v a -> SplayTree v a -> SplayTree v a #

min :: SplayTree v a -> SplayTree v a -> SplayTree v a #

(Show a, Show v) => Show (SplayTree v a) Source # 
Instance details

Defined in Data.SplayTree

Methods

showsPrec :: Int -> SplayTree v a -> ShowS #

show :: SplayTree v a -> String #

showList :: [SplayTree v a] -> ShowS #

Measured v a => Semigroup (SplayTree v a) Source # 
Instance details

Defined in Data.SplayTree

Methods

(<>) :: SplayTree v a -> SplayTree v a -> SplayTree v a #

sconcat :: NonEmpty (SplayTree v a) -> SplayTree v a #

stimes :: Integral b => b -> SplayTree v a -> SplayTree v a #

Measured v a => Monoid (SplayTree v a) Source # 
Instance details

Defined in Data.SplayTree

Methods

mempty :: SplayTree v a #

mappend :: SplayTree v a -> SplayTree v a -> SplayTree v a #

mconcat :: [SplayTree v a] -> SplayTree v a #

null :: SplayTree v a -> Bool Source #

Is the splay tree empty?

Since: 0.2.0.0

Construction

singleton :: Measured v a => a -> SplayTree v a Source #

(<|) :: Measured v a => a -> SplayTree v a -> SplayTree v a infixr 5 Source #

(|>) :: Measured v a => SplayTree v a -> a -> SplayTree v a infixl 5 Source #

fork :: Measured v a => SplayTree v a -> a -> SplayTree v a -> SplayTree v a Source #

Deconstruction

uncons :: Measured v a => SplayTree v a -> Maybe (a, SplayTree v a) Source #

unsnoc :: Measured v a => SplayTree v a -> Maybe (SplayTree v a, a) Source #

data SplitResult v a Source #

Constructors

Outside 
Inside (SplayTree v a) a (SplayTree v a) 
Instances
(Eq a, Eq v) => Eq (SplitResult v a) Source # 
Instance details

Defined in Data.SplayTree

Methods

(==) :: SplitResult v a -> SplitResult v a -> Bool #

(/=) :: SplitResult v a -> SplitResult v a -> Bool #

(Ord a, Ord v) => Ord (SplitResult v a) Source # 
Instance details

Defined in Data.SplayTree

Methods

compare :: SplitResult v a -> SplitResult v a -> Ordering #

(<) :: SplitResult v a -> SplitResult v a -> Bool #

(<=) :: SplitResult v a -> SplitResult v a -> Bool #

(>) :: SplitResult v a -> SplitResult v a -> Bool #

(>=) :: SplitResult v a -> SplitResult v a -> Bool #

max :: SplitResult v a -> SplitResult v a -> SplitResult v a #

min :: SplitResult v a -> SplitResult v a -> SplitResult v a #

(Show a, Show v) => Show (SplitResult v a) Source # 
Instance details

Defined in Data.SplayTree

Methods

showsPrec :: Int -> SplitResult v a -> ShowS #

show :: SplitResult v a -> String #

showList :: [SplitResult v a] -> ShowS #

split :: Measured v a => (v -> Bool) -> SplayTree v a -> SplitResult v a Source #

Maps

map :: (Measured v a, Measured w b) => (a -> b) -> SplayTree v a -> SplayTree w b Source #

mapWithPos :: (Measured v a, Measured w b) => (v -> a -> b) -> SplayTree v a -> SplayTree w b Source #

mapWithContext :: (Measured v a, Measured w b) => (v -> a -> v -> b) -> SplayTree v a -> SplayTree w b Source #

Traversals

traverse :: (Measured v a, Measured w b, Applicative f) => (a -> f b) -> SplayTree v a -> f (SplayTree w b) Source #

traverseWithPos :: (Measured v a, Measured w b, Applicative f) => (v -> a -> f b) -> SplayTree v a -> f (SplayTree w b) Source #

traverseWithContext :: (Measured v a, Measured w b, Applicative f) => (v -> a -> v -> f b) -> SplayTree v a -> f (SplayTree w b) Source #