Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- chunks :: Rope a -> [a]
- singleton :: Sized a => a -> Rope a
- one :: Sized a => a -> Rope a
- map :: Sized b => (a -> b) -> Rope a -> Rope b
- traverse :: (Applicative f, Sized b) => (a -> f b) -> Rope a -> f (Rope b)
- null :: Sized a => Rope a -> Bool
- flatten :: Monoid a => Rope a -> a
- two :: Sized a => Rope a -> Rope a -> Rope a
- cons :: (Sized a, Semigroup a) => a -> Rope a -> Rope a
- uncons :: Sized a => Rope a -> Maybe (a, Rope a)
- snoc :: (Sized a, Semigroup a) => Rope a -> a -> Rope a
- unsnoc :: Sized a => Rope a -> Maybe (Rope a, a)
- index :: (Sized a, Index a ch) => Int -> Rope a -> Maybe ch
- debugDepth :: Rope a -> Int
- class Sized a where
- class Take a where
- class Drop a where
- class Reverse a where
- reverse :: a -> a
- class Index a elem where
- unsafeIndex :: Int -> a -> elem
- data Rope a
Documentation
debugDepth :: Rope a -> Int Source #
Roughly size-balanced binary tree of chunks. There are a few operations that are sloppier about rebalancing as long as that can't lead to trees of more than logarithmic depth.
The Int
in the Two
constructor is a cached size of that subtree.
Instances
Foldable Rope Source # | |
Defined in Unison.Util.Rope fold :: Monoid m => Rope m -> m # foldMap :: Monoid m => (a -> m) -> Rope a -> m # foldMap' :: Monoid m => (a -> m) -> Rope a -> m # foldr :: (a -> b -> b) -> b -> Rope a -> b # foldr' :: (a -> b -> b) -> b -> Rope a -> b # foldl :: (b -> a -> b) -> b -> Rope a -> b # foldl' :: (b -> a -> b) -> b -> Rope a -> b # foldr1 :: (a -> a -> a) -> Rope a -> a # foldl1 :: (a -> a -> a) -> Rope a -> a # elem :: Eq a => a -> Rope a -> Bool # maximum :: Ord a => Rope a -> a # | |
(Sized a, Semigroup a) => Monoid (Rope a) Source # | |
(Sized a, Semigroup a) => Semigroup (Rope a) Source # | |
NFData a => NFData (Rope a) Source # | |
Defined in Unison.Util.Rope | |
(Sized a, Take a, Drop a, Eq a) => Eq (Rope a) Source # | |
(Sized a, Take a, Drop a, Ord a) => Ord (Rope a) Source # | |
(Sized a, Semigroup a, Drop a) => Drop (Rope a) Source # | |
Reverse a => Reverse (Rope a) Source # | |
Sized a => Sized (Rope a) Source # | |
(Sized a, Semigroup a, Take a) => Take (Rope a) Source # | |
(Sized a, Index a ch) => Index (Rope a) ch Source # | |
Defined in Unison.Util.Rope unsafeIndex :: Int -> Rope a -> ch Source # |