[commit: ghc] master: Fix Trac #5721; type variables can be quoted in TH (d276123)
Simon Peyton Jones
simonpj at microsoft.com
Thu Dec 29 11:32:18 CET 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/d2761231ceb8f4336d22464c9f00f1249b18ae86
>---------------------------------------------------------------
commit d2761231ceb8f4336d22464c9f00f1249b18ae86
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Thu Dec 29 10:30:34 2011 +0000
Fix Trac #5721; type variables can be quoted in TH
>---------------------------------------------------------------
compiler/typecheck/TcSplice.lhs | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/compiler/typecheck/TcSplice.lhs b/compiler/typecheck/TcSplice.lhs
index ed8b1c4..37fa817 100644
--- a/compiler/typecheck/TcSplice.lhs
+++ b/compiler/typecheck/TcSplice.lhs
@@ -369,14 +369,15 @@ tc_bracket :: ThStage -> HsBracket Name -> TcM TcType
tc_bracket outer_stage br@(VarBr _ name) -- Note [Quoting names]
= do { thing <- tcLookup name
; case thing of
- AGlobal _ -> return ()
+ AGlobal {} -> return ()
+ ATyVar {} -> return ()
ATcId { tct_level = bind_lvl, tct_id = id }
| thTopLevelId id -- C.f TcExpr.checkCrossStageLifting
-> keepAliveTc id
| otherwise
-> do { checkTc (thLevel outer_stage + 1 == bind_lvl)
(quotedNameStageErr br) }
- _ -> pprPanic "th_bracket" (ppr name)
+ _ -> pprPanic "th_bracket" (ppr name $$ ppr thing)
; tcMetaTy nameTyConName -- Result type is Var (not Q-monadic)
}
More information about the Cvs-ghc
mailing list