#2893: Implement "Quantified contexts" proposal
------------------------------+---------------------------------------------
Reporter: porges | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.1
Severity: normal | Resolution:
Keywords: proposal | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
------------------------------+---------------------------------------------
Comment (by porges):
Well here's an example: today I was trying to write an instance of
Applicative for things that are Monoids and Foldable (started by
generalizing from [a]):
This is currently not possible because Applicative & Foldable are both (*
-> *) and Monoids are (*). As far as I can tell, the proposal would allow
something like this:
{{{
instance (Foldable l, forall a. Monoid (l a)) => Applicative l where
fs <*> xs = foldMap (<$> xs) fs
}}}
I may be horribly wrong, however :)
(Also I can't implement pure :P)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2893#comment:2>
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