[Haskell-cafe] Does this typeclass have a name?
spam at scientician.net
Mon Apr 21 18:23:24 UTC 2014
On 2014-04-21 15:46, Andras Slemmer wrote:
> I think what you're looking for are monoid actions:
> And the laws the typeclass should satisfy:
> foo bar = id
> foo f . foo g = foo (f `mappend` g)
> The identity law is optional, in whihc case your 'e' would be a semigroup
> without a default 'bar'
Ah, yes, thanks. That looks about right, but unfortunately I have even
less structure in that I don't have a monoid -- I had previously looked
at group actions, but those have various extra laws.
Maybe I should just call it "Action", but avoid the monoid bits.
More information about the Haskell-Cafe