monoid-subclasses-0.3.4: Subclasses of Monoid

Safe HaskellNone



This module defines the monoid transformer data type Concat.



data Concat a Source

Concat a is a newtype wrapper around Seq a. The behaviour of the Concat a instances of monoid subclasses is identical to the behaviour of their a instances, up to the inject . singleton isomorphism.

The only purpose of Concat then is to change the performance characteristics of various operations. Most importantly, injecting a monoid into a Concat has the effect of making mappend a constant-time operation.