Opened 9 years ago

Closed 8 years ago

#3362 closed proposal (wontfix)

Adding a newtype EndoCategory to Control.Category

Reported by: r6 Owned by:
Priority: normal Milestone: Not GHC
Component: libraries/base Version: 6.10.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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)

Change History (3)

comment:1 Changed 9 years ago by r6

class Monad m where
return and Kleisli compose
must form a monoid

by lilac

comment:2 Changed 9 years ago by igloo

difficulty: Unknown
Milestone: Not GHC

comment:3 Changed 8 years ago by igloo

Resolution: wontfix
Status: newclosed
Type of failure: None/Unknown

Looks like an abandoned proposal

Note: See TracTickets for help on using tickets.