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

On branch  : type-holes-branch

http://hackage.haskell.org/trac/ghc/changeset/f37750475b13c255e9e1e207171381cabf1dadfe

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

commit f37750475b13c255e9e1e207171381cabf1dadfe
Author: Thijs Alkemade <[email protected]>
Date:   Thu Aug 30 21:10:03 2012 +0200

    Fix the construction of the constraint, so it gets the right [ErrCtxt], and 
so it can be properly located.
    
    Like:
    
    In an expression: ...
    In an equation for ...

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

 compiler/typecheck/TcExpr.lhs |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/typecheck/TcExpr.lhs b/compiler/typecheck/TcExpr.lhs
index c1b12ff..7da963c 100644
--- a/compiler/typecheck/TcExpr.lhs
+++ b/compiler/typecheck/TcExpr.lhs
@@ -236,9 +236,9 @@ tcExpr HsHole res_ty
       ; traceTc "tcExpr.HsHole" (ppr ty)
       ; lenv <- getLclTypeEnv
       ; ev <- mkSysLocalM (mkFastString "_") ty
-      ; let loc = HoleOrigin lenv
-      ; span <- getSrcSpanM
-      ; let can = (CHoleCan (Wanted (CtLoc loc span []) ty ev) ty 0)
+      ; let origin = HoleOrigin lenv
+      ; loc <- getCtLoc origin
+      ; let can = (CHoleCan (Wanted loc ty ev) ty 0)
       ; traceTc "tcExpr.HsHole emitting" (ppr can)
       ; emitInsoluble can
       ; tcWrapResult (HsVar ev) ty res_ty }



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

Reply via email to