diff options
author | simonpj@microsoft.com <unknown> | 2010-02-10 09:39:10 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2010-02-10 09:39:10 +0000 |
commit | 6f8ff0bbad3b9fa389c960ad1b5a267a1ae502f1 (patch) | |
tree | bed69a56e2e5a840ac0c05293854f343f9b7ee82 /compiler/rename/RnHsSyn.lhs | |
parent | 4b357e2a7e7eff16cb51b01830636d451664b202 (diff) | |
download | haskell-6f8ff0bbad3b9fa389c960ad1b5a267a1ae502f1.tar.gz |
Several TH/quasiquote changes
a) Added quasi-quote forms for
declarations
types
e.g. f :: [$qq| ... |]
b) Allow Template Haskell pattern quotes (but not splices)
e.g. f x = [p| Int -> $x |]
c) Improve pretty-printing for HsPat to remove superfluous
parens. (This isn't TH related really, but it affects
some of the same code.)
A consequence of (a) is that when gathering and grouping declarations
in RnSource.findSplice, we must expand quasiquotes as we do so.
Otherwise it's all fairly straightforward. I did a little bit of
refactoring in TcSplice.
User-manual changes still to come.
Diffstat (limited to 'compiler/rename/RnHsSyn.lhs')
-rw-r--r-- | compiler/rename/RnHsSyn.lhs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rename/RnHsSyn.lhs b/compiler/rename/RnHsSyn.lhs index 5fbe7f7eed..cb0727b7cc 100644 --- a/compiler/rename/RnHsSyn.lhs +++ b/compiler/rename/RnHsSyn.lhs @@ -70,6 +70,7 @@ extractHsTyNames ty get (HsTyVar tv) = unitNameSet tv get (HsSpliceTy {}) = emptyNameSet -- Type splices mention no type variables get (HsSpliceTyOut {}) = emptyNameSet -- Ditto + get (HsQuasiQuoteTy {}) = emptyNameSet -- Ditto get (HsKindSig ty _) = getl ty get (HsForAllTy _ tvs ctxt ty) = (extractHsCtxtTyNames ctxt |