Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
cb8fb4dc
Commit
cb8fb4dc
authored
Feb 09, 2011
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/typecheck/TcSplice.lhs
View file @
cb8fb4dc
...
...
@@ -386,7 +386,7 @@ tc_bracket outer_stage (VarBr name) -- Note [Quoting names]
}
tc_bracket _ (ExpBr expr)
= do { any_ty <- newFlexiTyVarTy
lifted
TypeKind
= do { any_ty <- newFlexiTyVarTy
open
TypeKind
; _ <- tcMonoExprNC expr any_ty -- NC for no context; tcBracket does that
; tcMetaTy expQTyConName }
-- Result type is ExpQ (= Q Exp)
...
...
@@ -407,7 +407,7 @@ tc_bracket _ (DecBrG decls)
; tcMetaTy decsQTyConName } -- Result type is Q [Dec]
tc_bracket _ (PatBr pat)
= do { any_ty <- newFlexiTyVarTy
lifted
TypeKind
= do { any_ty <- newFlexiTyVarTy
open
TypeKind
; _ <- tcPat ThPatQuote pat any_ty $
return ()
; tcMetaTy patQTyConName }
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment