HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulemonoid-subclasses-1.2.6.1Haskell2010

Data.Monoid.Instances.Concat

This module defines the monoid transformer data type Concat.

  • 1 type
  • 3 values
datadata Concat a
#

Concat is a transparent monoid transformer. The behaviour of the Concat a instances of monoid subclasses is identical to the behaviour of their a instances, up to the pure isomorphism.

The only purpose of Concat then is to change the performance characteristics of various operations. Most importantly, injecting a monoid into Concat has the effect of making mappend a constant-time operation. The splitPrimePrefix and splitPrimeSuffix operations are amortized to constant time, provided that only one or the other is used. Using both operations alternately will trigger the worst-case behaviour of O(n).

Instances20Functor, Applicative, Foldable, Eq, Data, Ord, …
valueextract :: Concat a -> Seq a
#

Deprecated. Concat is not wrapping Seq any more, don't use concatenate nor extract.