[GHC] #9612: Use functional dependencies to give more specific error messages
GHC
ghc-devs at haskell.org
Fri Sep 26 11:34:50 UTC 2014
#9612: Use functional dependencies to give more specific error messages
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner:
Type: feature | Status: new
request | Milestone:
Priority: normal | Version: 7.8.3
Component: Compiler | Keywords:
(Type checker) | Architecture: Unknown/Multiple
Resolution: | Difficulty: Unknown
Operating System: | Blocked By:
Unknown/Multiple | Related Tickets:
Type of failure: |
None/Unknown |
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones <simonpj@…>):
In [changeset:"20632d37b5bcb68bb0ca34238f1ed49c7be3a8f7/ghc"]:
{{{
#!CommitTicketReference repository="ghc"
revision="20632d37b5bcb68bb0ca34238f1ed49c7be3a8f7"
Do not discard insoluble Derived constraints
This is preparing for a fix to Trac #9612. The idea is that insoluble
constraints are nice solid errors that we should not discard before
we have a chance to report them. So TcRnTypes.dropDerivedWC now
keeps insoluble Derived constrains, and instead TcSimplify.solve_wanteds
filters them out
We get somewhat better error message for kind-equality failures too.
A slight downside is that to avoid *duplicate* kind-equality failures
when we float a kind-incompatible equality (e.g. alpha:* ~ Int#),
I've disabled constraint-floating when there are insolubles. But that
in turn makes a handful of error messages a little less informative;
good examples are mc21, mc22, mc25. But I am re-jigging the
constraint floating machinery in another branch, which will make this
go back to the way it was before.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9612#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list