Module

Data.Monoid.SemiDirectProduct

Package
purescript-monoid-extras
Repository
mikesol/purescript-monoid-extras

A strict version of the semi-direct product. If a monoid m acts

#Semi Source

data Semi s m

The semi-direct product of monoids @s@ and @m@, which is a monoid

Instances

#unSemi Source

unSemi :: forall s m. Semi s m -> s /\ m

#tag Source

tag :: forall s m. s -> m -> Semi s m

Tag an @s@ value with an @m@ value to create an element of the

#inject Source

inject :: forall s m. Monoid m => s -> Semi s m

The injection map, /i.e./ give an @s@ value a trivial tag.

#untag Source

untag :: forall s m. Semi s m -> s

Forget the monoidal tag. Of course, @untag . inject = id@, and

#embed Source

embed :: forall s m. Monoid s => m -> Semi s m

Embed a "tag" value as a value of type @Semi s m@. Note that

#quotient Source

quotient :: forall s m. Semi s m -> m

The quotient map, /i.e./ retrieve the monoidal tag value.