Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/49861e71e3873bafddbd7b0c21041a8b7902af4b

>---------------------------------------------------------------

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(-)


Diff suppressed because of size. To see it, use:

    git show 49861e71e3873bafddbd7b0c21041a8b7902af4b

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to