alt-stdlib: Ticket #5: GHC extension for higher rank types in constraints
http://trac.haskell.org/alt-stdlib/ticket/5
<p>
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 <a class="missing wiki" href="http://trac.haskell.org/alt-stdlib/wiki/MonadPlus" rel="nofollow">MonadPlus?</a> 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:
</p>
<pre class="wiki">constraint Alternative f = (Applicative f, forall a . Monoid (f a))
</pre><p>
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.
</p>
en-usalt-stdlibhttp://trac.haskell.org/alt-stdlib/chrome/common/trac_banner.png
http://trac.haskell.org/alt-stdlib/ticket/5
Trac 0.11.1jmcarthurFri, 05 Mar 2010 19:31:38 GMTcomment added; type changed
http://trac.haskell.org/alt-stdlib/ticket/5#comment:1
http://trac.haskell.org/alt-stdlib/ticket/5#comment:1
<ul>
<li><strong>type</strong>
changed from <em>defect</em> to <em>enhancement</em>
</li>
</ul>
Ticket