Ticket #5 (new enhancement)

Opened 4 years ago

Last modified 4 years ago

GHC extension for higher rank types in constraints

Reported by: jmcarthur Owned by: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:


I've been putting a little thought into how to combine an algebra with functors in the same way that Alternative lifts monoids into Applicatives and MonadPlus? lifts monoids into Monads (with some extra laws). It occurred to me that the relationship between, say, Monoid, Applicative, and Alternative could be expressed like this:

constraint Alternative f = (Applicative f, forall a . Monoid (f a))

The above syntax is a combination of the proposed constraint families extension and this proposal. The "forall" portion is the one I'd like to focus on. I haven't put much thought into it yet, but perhaps this could open opportunities for generalization elsewhere.

Change History

Changed 4 years ago by jmcarthur

  • type changed from defect to enhancement
Note: See TracTickets for help on using tickets.