#3362: Adding a newtype EndoCategory to Control.Category
-----------------------------+----------------------------------------------
Reporter: r6 | Owner:
Type: proposal | Status: new
Priority: normal | Component: libraries/base
Version: 6.10.2 | Severity: normal
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-----------------------------+----------------------------------------------
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)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3362>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs