[GHC] #4485: Per-class incoherence,
and solve incoherent instances last (was: Unexplained change in
type-inference + OverlappingInstances in)
GHC
cvs-ghc at haskell.org
Mon Nov 15 09:38:38 EST 2010
#4485: Per-class incoherence, and solve incoherent instances last
---------------------------------+------------------------------------------
Reporter: JeremyShaw | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.2.1
Component: Compiler | Version: 7.0.1 RC1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: GHC rejects valid program
---------------------------------+------------------------------------------
Comment(by simonpj):
This patch fixes the crash in overlap reporting. Please push to the 7.0
branch.
{{{
Mon Nov 15 14:28:05 GMT 2010 simonpj at microsoft.com
* Ensure that instance overlap errors are report properly
This (annoyingly) requires us to re-flatten the class predicate.
See Note [Flattening in error message generation]
M ./compiler/typecheck/TcErrors.lhs -37 +91
}}}
I'll re-title the ticket to now ask for per-class incoherent instances
(which is a feature that makes sense to me). This links to people who
want somewhat less draconian checking on instance overlap: #3877 and
#4259.
Also there's a case for making the solver solve (incoherent) type class
instances ''last'', so that all the equality info we have is available.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4485#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list