#5287: The 'impossible' happened. solveDerivEqns: probable loop
-------------------------------+--------------------------------------------
Reporter: agocorona | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone: 7.4.1
Component: Compiler | Version: 7.0.3
Keywords: solveDerivEqns | Testcase:
Blockedby: | Difficulty:
Os: Windows | Blocking:
Architecture: x86 | Failure: Compile-time crash
-------------------------------+--------------------------------------------
Comment(by simonpj@…):
commit 49861e71e3873bafddbd7b0c21041a8b7902af4b
{{{
Author: Simon Peyton Jones <[email protected]>
Date: Sat Jul 23 18:30:46 2011 +0100
Reject bad 'deriving' directives (fixes Trac #5287)
The 'deriving' mechanism that infers the context for
an instance declarations was going into a loop, as a
result of an instance like
instance C a b => D [a]
where the 'b' isn't mentioned in the head.
This patch identifies those cases. I also needed to make
TcErrors generate a suitable error message. On the way
I improved the reporting of "ambiguous" variables;
for example arrowfail001 now generates a better message.
compiler/typecheck/TcDeriv.lhs | 22 +--------
compiler/typecheck/TcErrors.lhs | 95
++++++++++++++++++-------------------
compiler/typecheck/TcMType.lhs | 38 ++++++++++-----
compiler/typecheck/TcSimplify.lhs | 5 +-
compiler/typecheck/TcType.lhs | 20 ++++++--
5 files changed, 91 insertions(+), 89 deletions(-)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5287#comment:8>
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