[project @ 2001-03-13 16:57:34 by simonpj]
authorsimonpj <unknown>
Tue, 13 Mar 2001 16:57:34 +0000 (16:57 +0000)
committersimonpj <unknown>
Tue, 13 Mar 2001 16:57:34 +0000 (16:57 +0000)
Add error location for deriving failure errors

ghc/compiler/typecheck/TcDeriv.lhs

index 298d2dd..86084ab 100644 (file)
@@ -405,7 +405,8 @@ solveDerivEqns inst_env_in orig_eqns
         in
            -- Simplify each RHS
        tcSetInstEnv inst_env (
-         listTc [ tcAddErrCtxt (derivCtxt tc) $
+         listTc [ tcAddSrcLoc (getSrcLoc tc)   $
+                  tcAddErrCtxt (derivCtxt tc)  $
                   tcSimplifyThetas deriv_rhs
                 | (_, _,tc,_,deriv_rhs) <- orig_eqns ]  
        )                                       `thenTc` \ next_solns ->