Skip to content
Snippets Groups Projects
Commit a716bd4d authored by Simon Peyton Jones's avatar Simon Peyton Jones Committed by Ian Lynagh
Browse files

Fix Trac #5721; type variables can be quoted in TH

parent c351950f
No related merge requests found
......@@ -368,14 +368,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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment