#5927: A type-level "implies" constraint on Constraints
----------------------------------------+-----------------------------------
Reporter: illissius | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.6.1
Component: Compiler (Type checker) | Version: 7.4.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
----------------------------------------+-----------------------------------
Changes (by simonpj):
* cc: dimitris@… (added)
* difficulty: => Unknown
* milestone: => 7.6.1
Comment:
What you say makes sense, but I don't have any idea how to achieve it.
One way to get what you want woudl be something like
{{{
instance (forall a. c a => Show a) => Show (Exists c) where ...
}}}
and that is close to the idea in Section 7.2 of
[http://research.microsoft.com/en-us/um/people/simonpj/papers/derive.htm
Derivable Type Classes].
I have no idea how difficult this would to actually implement, but last
time I thought about it, it seemed pretty hard. I'll milestone it at 7.6
for now, but it's much more than an incremental feature.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5927#comment:1>
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