Commit cb8fb4dc authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Allow TH brackets to contain things of any kind

You can now quasi-quote things with unboxed types, and unboxed tuples.
parent 43cc549d
...@@ -386,7 +386,7 @@ tc_bracket outer_stage (VarBr name) -- Note [Quoting names] ...@@ -386,7 +386,7 @@ tc_bracket outer_stage (VarBr name) -- Note [Quoting names]
} }
tc_bracket _ (ExpBr expr) tc_bracket _ (ExpBr expr)
= do { any_ty <- newFlexiTyVarTy liftedTypeKind = do { any_ty <- newFlexiTyVarTy openTypeKind
; _ <- tcMonoExprNC expr any_ty -- NC for no context; tcBracket does that ; _ <- tcMonoExprNC expr any_ty -- NC for no context; tcBracket does that
; tcMetaTy expQTyConName } ; tcMetaTy expQTyConName }
-- Result type is ExpQ (= Q Exp) -- Result type is ExpQ (= Q Exp)
...@@ -407,7 +407,7 @@ tc_bracket _ (DecBrG decls) ...@@ -407,7 +407,7 @@ tc_bracket _ (DecBrG decls)
; tcMetaTy decsQTyConName } -- Result type is Q [Dec] ; tcMetaTy decsQTyConName } -- Result type is Q [Dec]
tc_bracket _ (PatBr pat) tc_bracket _ (PatBr pat)
= do { any_ty <- newFlexiTyVarTy liftedTypeKind = do { any_ty <- newFlexiTyVarTy openTypeKind
; _ <- tcPat ThPatQuote pat any_ty $ ; _ <- tcPat ThPatQuote pat any_ty $
return () return ()
; tcMetaTy patQTyConName } ; tcMetaTy patQTyConName }
......
Supports Markdown
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