Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/4dd0fd314fd4da0634d42274d71a1e21a6d98326

>---------------------------------------------------------------

commit 4dd0fd314fd4da0634d42274d71a1e21a6d98326
Author: Simon Peyton Jones <[email protected]>
Date:   Fri Mar 30 12:48:34 2012 +0100

    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.

>---------------------------------------------------------------

 compiler/typecheck/TcSplice.lhs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/compiler/typecheck/TcSplice.lhs b/compiler/typecheck/TcSplice.lhs
index 1ff9dc1..a345da5 100644
--- a/compiler/typecheck/TcSplice.lhs
+++ b/compiler/typecheck/TcSplice.lhs
@@ -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)
 



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to