monoid-subclasses-0.3.6.2: Subclasses of Monoid

Safe HaskellNone
LanguageHaskell2010

Data.Monoid.Instances.Concat

Description

This module defines the monoid transformer data type Concat.

Synopsis

Documentation

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.

inject :: (MonoidNull a, PositiveMonoid a) => Seq a -> Concat a Source

Deprecated: Use concatenate instead.