[GHC] #9033: Type error suppresses defaulting, causes spurious errors
GHC
ghc-devs at haskell.org
Mon Apr 28 10:00:13 UTC 2014
#9033: Type error suppresses defaulting, causes spurious errors
---------------------------------+-----------------------------------------
Reporter: jun0 | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords: defaulting, ambiguous
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Unknown
Type of failure: None/Unknown | Blocked By:
Test Case: | Related Tickets:
Blocking: |
---------------------------------+-----------------------------------------
Comment (by Simon Peyton Jones <simonpj@…>):
In [changeset:"ba2e20149e2addaccf5ce3122d3a6e93da696a0a/ghc"]:
{{{
#!CommitTicketReference repository="ghc"
revision="ba2e20149e2addaccf5ce3122d3a6e93da696a0a"
Do type-class defaulting even if there are insoluble constraints
The argument in Trac #9033 is very compelling: we should not report 20
errors, fix one, and have the other 19 disappear. They were spurious
in the first place.
The fix was easy; do type-class defaulting uncondionally, rather than
only if there are no insoluble constraints.
See Note [When to do type-class defaulting] in TcSimplify.
Error messages generally improve, especially tc211 which actually
had an example of precisely this phenomenon.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9033#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list