Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- class Monoid v => Measured v a | a -> v where
- measure :: a -> v
- data SplayTree v a
- null :: SplayTree v a -> Bool
- singleton :: Measured v a => a -> SplayTree v a
- (<|) :: Measured v a => a -> SplayTree v a -> SplayTree v a
- (|>) :: Measured v a => SplayTree v a -> a -> SplayTree v a
- fork :: Measured v a => SplayTree v a -> a -> SplayTree v a -> SplayTree v a
- uncons :: Measured v a => SplayTree v a -> Maybe (a, SplayTree v a)
- unsnoc :: Measured v a => SplayTree v a -> Maybe (SplayTree v a, a)
- data SplitResult v a
- split :: Measured v a => (v -> Bool) -> SplayTree v a -> SplitResult v a
- map :: (Measured v a, Measured w b) => (a -> b) -> SplayTree v a -> SplayTree w b
- mapWithPos :: (Measured v a, Measured w b) => (v -> a -> b) -> SplayTree v a -> SplayTree w b
- mapWithContext :: (Measured v a, Measured w b) => (v -> a -> v -> b) -> SplayTree v a -> SplayTree w b
- traverse :: (Measured v a, Measured w b, Applicative f) => (a -> f b) -> SplayTree v a -> f (SplayTree w b)
- traverseWithPos :: (Measured v a, Measured w b, Applicative f) => (v -> a -> f b) -> SplayTree v a -> f (SplayTree w b)
- traverseWithContext :: (Measured v a, Measured w b, Applicative f) => (v -> a -> v -> f b) -> SplayTree v a -> f (SplayTree w b)
Documentation
Instances
Measured v a => Measured v (SplayTree v a) Source # | |
Defined in Data.SplayTree | |
Foldable (SplayTree v) Source # | |
Defined in Data.SplayTree 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 # | |
(Eq a, Eq v) => Eq (SplayTree v a) Source # | |
(Ord a, Ord v) => Ord (SplayTree v a) Source # | |
Defined in Data.SplayTree 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 # | |
(Show a, Show v) => Show (SplayTree v a) Source # | |
Measured v a => Semigroup (SplayTree v a) Source # | |
Measured v a => Monoid (SplayTree v a) Source # | |
Construction
Deconstruction
data SplitResult v a Source #
Instances
(Eq a, Eq v) => Eq (SplitResult v a) Source # | |
Defined in Data.SplayTree (==) :: SplitResult v a -> SplitResult v a -> Bool # (/=) :: SplitResult v a -> SplitResult v a -> Bool # | |
(Ord a, Ord v) => Ord (SplitResult v a) Source # | |
Defined in Data.SplayTree 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 # | |
Defined in Data.SplayTree showsPrec :: Int -> SplitResult v a -> ShowS # show :: SplitResult v a -> String # showList :: [SplitResult v a] -> ShowS # |
Maps
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 #