Safe Haskell | None |
---|---|
Language | Haskell2010 |
Monoid and group actions (M-Sets and G-Sets).
The category of MSet
s (and GSet
s) is monadic (unlike the category of SSet
s).
Documentation
class (Monoid m, SSet m a) => MSet m a Source #
Lawful instance should satisfy:
act mempty = id
g `act` h `act` a = g <> h `act` a
This is the same as to say that act
is a monoid homomorphism from m
to
the monoid of endomorphisms of a
(i.e. maps from a
to a
).
Note that if g
is a
then an Group
MSet
is simply a GSet
, this
is because monoids and groups share the same morphisms (a monoid homomorphis
between groups necessarily preserves inverses).
Instances
Monoid m => MSet m m Source # | |
Defined in Data.Monoid.MSet | |
MSet m a => MSet m (IO a) Source # | |
Defined in Data.Monoid.MSet | |
MSet m a => MSet m (Down a) Source # | |
Defined in Data.Monoid.MSet | |
MSet m a => MSet m (Maybe a) Source # | |
Defined in Data.Monoid.MSet | |
MSet m a => MSet m (Identity a) Source # | |
Defined in Data.Monoid.MSet | |
(MSet m a, Ord a) => MSet m (Set a) Source # | |
Defined in Data.Monoid.MSet | |
MSet m a => MSet m (NonEmpty a) Source # | |
Defined in Data.Monoid.MSet | |
MSet m a => MSet m [a] Source # | |
Defined in Data.Monoid.MSet | |
Monoid m => MSet m (FreeMSet m a) Source # | |
Defined in Data.Monoid.MSet | |
MSet m b => MSet m (a -> b) Source # | |
Defined in Data.Monoid.MSet | |
MSet m b => MSet m (Either a b) Source # | |
Defined in Data.Monoid.MSet | |
(MSet m a, MSet m b) => MSet m (a, b) Source # | |
Defined in Data.Monoid.MSet | |
MSet m a => MSet m (Const a b) Source # | |
Defined in Data.Monoid.MSet | |
(MSet m a, MSet m b, MSet m c) => MSet m (a, b, c) Source # | |
Defined in Data.Monoid.MSet | |
(Functor f, Functor h, MSet m a) => MSet m (Sum f h a) Source # | |
Defined in Data.Monoid.MSet | |
(Functor f, Functor h, MSet m a) => MSet m (Product f h a) Source # | |
Defined in Data.Monoid.MSet | |
(MSet m a, MSet m b, MSet m c, MSet m d) => MSet m (a, b, c, d) Source # | |
Defined in Data.Monoid.MSet | |
(MSet m a, MSet m b, MSet m c, MSet m d, MSet m e) => MSet m (a, b, c, d, e) Source # | |
Defined in Data.Monoid.MSet | |
(MSet m a, MSet m b, MSet m c, MSet m d, MSet m e, MSet m f) => MSet m (a, b, c, d, e, f) Source # | |
Defined in Data.Monoid.MSet | |
(MSet m a, MSet m b, MSet m c, MSet m d, MSet m e, MSet m f, MSet m h) => MSet m (a, b, c, d, e, f, h) Source # | |
Defined in Data.Monoid.MSet | |
(MSet m a, MSet m b, MSet m c, MSet m d, MSet m e, MSet m f, MSet m h, MSet m i) => MSet m (a, b, c, d, e, f, h, i) Source # | |
Defined in Data.Monoid.MSet | |
MSet m a => MSet (Identity m) a Source # | |
Defined in Data.Monoid.MSet | |
MSet (Endo a) a Source # | |
Defined in Data.Monoid.MSet | |
Monoid m => MSet (Sum Natural) m Source # | |
Defined in Data.Monoid.MSet |
The monoid of endomorphisms under composition.
>>>
let computation = Endo ("Hello, " ++) <> Endo (++ "!")
>>>
appEndo computation "Haskell"
"Hello, Haskell!"
FreeMSet | |
|