[commit: ghc] type-holes-branch: It seems we need to indicate here that we are interested in these types. (f420dcd)

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  : type-holes-branch

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

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

commit f420dcdfbbb48a5478f72d19e940a3af77d46c49
Author: Thijs Alkemade <[email protected]>
Date:   Thu Jan 26 13:11:14 2012 +0100

    It seems we need to indicate here that we are interested in these types.

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

 compiler/typecheck/TcRnDriver.lhs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/compiler/typecheck/TcRnDriver.lhs b/compiler/typecheck/TcRnDriver.lhs
index 4788380..5d4d4f7 100644
--- a/compiler/typecheck/TcRnDriver.lhs
+++ b/compiler/typecheck/TcRnDriver.lhs
@@ -1453,11 +1453,14 @@ tcRnExpr hsc_env ictxt rdr_expr
     uniq <- newUnique ;
     let { fresh_it  = itName uniq (getLoc rdr_expr) } ;
     ((_tc_expr, res_ty), lie)	<- captureConstraints (tcInferRho rn_expr) ;
+    
+    (_, l) <- getEnvs ;
+    holes <- readTcRef $ tcl_holes l ;
     ((qtvs, dicts, _, _), lie_top) <- captureConstraints $ 
                                       {-# SCC "simplifyInfer" #-}
                                       simplifyInfer True {- Free vars are closed -}
                                                     False {- No MR for now -}
-                                                    [(fresh_it, res_ty)]
+                                                    ([(fresh_it, res_ty)] ++ (map (\(s,(ty,_)) -> (undefined, ty)) $ Map.toList holes)) -- mkInternalName undefined (mkOccName Name.varName "__") s
                                                     lie  ;
     _ <- simplifyInteractive lie_top ;       -- Ignore the dicionary bindings
 
@@ -1465,8 +1468,6 @@ tcRnExpr hsc_env ictxt rdr_expr
     let { all_expr_ty = mkForAllTys qtvs (mkPiTypes dicts res_ty) } ;
     result <- zonkTcType all_expr_ty ;
     
-    (_, l) <- getEnvs ;
-    holes <- readTcRef $ tcl_holes l ;
     zonked_holes <- mapM (\(s, ty) -> liftM (\t -> (s, t)) $ zonkTcType ty)
 				$ Map.toList $ Map.map (\(ty, _) -> mkForAllTys qtvs $ mkPiTypes dicts ty) $ holes ;
     let { (env, tys) = foldr tidy (emptyTidyEnv, []) zonked_holes } ;
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.