Adding a newtype EndoCategory to Control.Category
I suggest adding a wrapper to make (a x x)
a Monoid
for any Category
a
and type x
. This would be added to Control.Category
.
newtype EndoCategory a x = EndoCategory { runEndoCategory :: a x x }
instance (Category a) => Monoid (EndoCategory a x) where
mempty = EndoCategory id
mappend (EndoCategory f) (EndoCategory g) = EndoCategory (f . g)
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries/base |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |