[commit: ghc] master: Wibble to recent changes to TcErrors (2677e42)

Simon Peyton Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/2677e4287c3eaee4249e4b6fe31586f2f698c33d

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

commit 2677e4287c3eaee4249e4b6fe31586f2f698c33d
Author: Simon Peyton Jones <[email protected]>
Date:   Wed Oct 31 16:15:32 2012 +0000

    Wibble to recent changes to TcErrors

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

 compiler/typecheck/TcErrors.lhs |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/compiler/typecheck/TcErrors.lhs b/compiler/typecheck/TcErrors.lhs
index 5fe27f7..a754d10 100644
--- a/compiler/typecheck/TcErrors.lhs
+++ b/compiler/typecheck/TcErrors.lhs
@@ -615,6 +615,7 @@ mkTyVarEqErr :: DynFlags -> ReportErrCtxt -> SDoc -> Ct
 mkTyVarEqErr dflags ctxt extra ct oriented tv1 ty2
   | isUserSkolem ctxt tv1   -- ty2 won't be a meta-tyvar, or else the thing would
                             -- be oriented the other way round; see TcCanonical.reOrient
+  || isSigTyVar tv1 && not (isTyVarTy ty2)
   = mkErrorMsg ctxt ct (vcat [ misMatchOrCND ctxt ct oriented ty1 ty2
                              , extraTyVarInfo ctxt ty1 ty2
                              , extra ])
@@ -640,8 +641,8 @@ mkTyVarEqErr dflags ctxt extra ct oriented tv1 ty2
 
   -- If the immediately-enclosing implication has 'tv' a skolem, and
   -- we know by now its an InferSkol kind of skolem, then presumably
-  -- it started life as a SigTv, else it'd have been unified.
-  -- So just report a mis-match here, without gettin into occurs-checks etc
+  -- it started life as a SigTv, else it'd have been unified, given
+  -- that there's no occurs-check or forall problem
   | (implic:_) <- cec_encl ctxt
   , Implic { ic_skols = skols } <- implic
   , tv1 `elem` skols
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.