-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Sequence optimized for monoidal construction and folding -- -- Data structure intended for accumulating a sequence of elements for -- later traversal or folding. Useful for implementing all kinds of -- builders on top. -- -- The benchmarks show that for the described use-case it is on average 2 -- times faster than Data.DList.DList and -- Data.Sequence.Seq, is on par with list when you always prepend -- elements and is exponentially faster than list when you append. @package acc @version 0.1.0.1 module Acc -- | Data structure intended for accumulating a sequence of elements for -- later traversal or folding. Useful for implementing all kinds of -- builders on top. -- -- To produce a single element Acc use pure. To produce a -- multielement Acc use fromList. To combine use -- <|> or <> and other Alternative and -- Monoid-related utils. To extract elements use Foldable -- API. -- -- The benchmarks show that for the described use-case this -- data-structure is on average 2 times faster than DList and -- Seq, is on par with list when you always prepend elements and -- is exponentially faster than list when you append. -- -- Internally it is implemented as a simple binary tree with all -- functions optimized to use tail recursion, ensuring that you don't get -- stack overflow. data Acc a instance GHC.Generics.Generic1 Acc.Acc instance GHC.Generics.Generic (Acc.Acc a) instance GHC.Base.Functor Acc.Acc instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Acc.Acc a) instance Control.DeepSeq.NFData1 Acc.Acc instance Data.Foldable.Foldable Acc.Acc instance Data.Traversable.Traversable Acc.Acc instance GHC.Base.Applicative Acc.Acc instance GHC.Base.Alternative Acc.Acc instance GHC.Base.Semigroup (Acc.Acc a) instance GHC.Base.Monoid (Acc.Acc a) instance GHC.Exts.IsList (Acc.Acc a) instance GHC.Show.Show a => GHC.Show.Show (Acc.Acc a)