From bd87e78712f1383979e9502dc9045d74e9b2e651 Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 2 Dec 2002 16:58:33 +0000 Subject: [PATCH] [project @ 2002-12-02 16:58:33 by simonpj] Remember to zapToType in tcSpliceExpr --- ghc/compiler/typecheck/TcSplice.lhs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/typecheck/TcSplice.lhs b/ghc/compiler/typecheck/TcSplice.lhs index 94e9c0e..41352b8 100644 --- a/ghc/compiler/typecheck/TcSplice.lhs +++ b/ghc/compiler/typecheck/TcSplice.lhs @@ -27,7 +27,7 @@ import TcSimplify ( tcSimplifyTop ) import TcType ( TcType, openTypeKind, mkAppTy ) import TcEnv ( spliceOK, tcMetaTy ) import TcRnTypes ( TopEnv(..) ) -import TcMType ( newTyVarTy ) +import TcMType ( newTyVarTy, zapToType ) import Name ( Name ) import TcRnMonad @@ -99,11 +99,12 @@ tcSpliceExpr name expr res_ty Brack _ ps_var lie_var -> -- A splice inside brackets - -- NB: ignore res_ty + -- NB: ignore res_ty, apart from zapping it to a mono-type -- e.g. [| reverse $(h 4) |] -- Here (h 4) :: Q Exp -- but $(h 4) :: forall a.a i.e. anything! + zapToType res_ty `thenM_` tcMetaTy exprTyConName `thenM` \ meta_exp_ty -> setStage (Splice next_level) ( setLIEVar lie_var $ -- 1.7.10.4