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 } ; _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
