Commit 4dd0fd31 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Don't do validity checking on types in Template Haskell type brackets

We might be in the "knot" of a type declaration: see Trac #5968.
parent e21e13fb
......@@ -390,7 +390,9 @@ tc_bracket _ (ExpBr expr)
-- Result type is ExpQ (= Q Exp)
tc_bracket _ (TypBr typ)
= do { _ <- tcHsSigTypeNC ThBrackCtxt typ
= do { _ <- tcLHsType typ -- Do not check type validity; we can have a bracket
-- inside a "knot" where things are not yet settled
-- eg data T a = MkT $(foo [t| a |])
; tcMetaTy typeQTyConName }
-- Result type is Type (= Q Typ)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment