[GHC] #8634: Relax functional dependency coherence check ("liberal coverage condition")
GHC
ghc-devs at haskell.org
Tue Jul 22 12:04:42 UTC 2014
#8634: Relax functional dependency coherence check ("liberal coverage condition")
-------------------------------------+-------------------------------------
Reporter: danilo2 | Owner:
Type: feature | Status: new
request | Milestone: 7.10.1
Priority: high | Version: 7.7
Component: Compiler | Keywords:
Resolution: | Operating System: Unknown/Multiple
Differential Revisions: Phab:D69 | Type of failure: None/Unknown
Architecture: | Test Case:
Unknown/Multiple | Blocking:
Difficulty: Unknown |
Blocked By: |
Related Tickets: #1241, |
#2247, #8356, #9103, #9227 |
-------------------------------------+-------------------------------------
Comment (by danilo2):
Replying to [comment:39 simonpj]:
1) Of course - you are right - with `-XScopedTypeVariables` it does
compile and works well - please forgot me, I overlooked the flag.
2) Yes this example satisfies the Coverage Condition, but as I described
before it is just another simplification of some problem and in general we
got instances which satisfy and which does not the condition.
3) There is other problem with providing such types by hand - we are
generating the code and it would be very hard to generate such annotations
in general.
@rwbarton: Thank you again for your example - of course it works as you
described. Still, while it needs some type signatures, they are hard for
us to generate (while we are generating the Haskell's code). I think
introducing optional `-XDysfunctionalDependencies` flag even as a local
flag or using `~>` symbol, as Simon suggested above, would be a great
thing - allowing to play with type system and creating easier some
"hackish" things if user wishesh to.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8634#comment:40>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list