HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulemonoid-subclasses-1.2.5.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.