Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module defines the monoid transformer data type Concat
.
- data Concat a
- inject :: (MonoidNull a, PositiveMonoid a) => Seq a -> Concat a
- extract :: Concat a -> Seq a
Documentation
is a Concat
anewtype
wrapper around
. The behaviour of the Seq
a
instances of monoid
subclasses is identical to the behaviour of their Concat
aa
instances, up to the
isomorphism.inject
. singleton
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.
(Eq a, Monoid a) => Eq (Concat a) | |
(Ord a, Monoid a) => Ord (Concat a) | |
Show a => Show (Concat a) | |
IsString a => IsString (Concat a) | |
Monoid (Concat a) | |
PositiveMonoid (Concat a) | |
MonoidNull (Concat a) | |
FactorialMonoid a => FactorialMonoid (Concat a) | |
(Eq a, RightGCDMonoid a, MonoidNull a, StableFactorialMonoid a) => RightGCDMonoid (Concat a) | |
(Eq a, LeftGCDMonoid a, MonoidNull a, StableFactorialMonoid a) => LeftGCDMonoid (Concat a) | |
(MonoidNull a, RightReductiveMonoid a, StableFactorialMonoid a) => RightReductiveMonoid (Concat a) | |
(LeftReductiveMonoid a, MonoidNull a, StableFactorialMonoid a) => LeftReductiveMonoid (Concat a) | |
(Eq a, TextualMonoid a, StableFactorialMonoid a) => TextualMonoid (Concat a) |
inject :: (MonoidNull a, PositiveMonoid a) => Seq a -> Concat a Source