[commit: ghc] master: Another raft of Template Haskell clean-up (51deeb0)
git at git.haskell.org
git at git.haskell.org
Mon Nov 25 16:58:53 UTC 2013
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/51deeb0db3abac9f4369d3f8a3744e1313ecebf4/ghc
>---------------------------------------------------------------
commit 51deeb0db3abac9f4369d3f8a3744e1313ecebf4
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Mon Nov 25 16:58:28 2013 +0000
Another raft of Template Haskell clean-up
The handling of typed and untyped brackets was extremely convoluted,
partly because of the evolutionary history. I've tidied it all up.
See Note [How brackets and nested splices are handled] in TcSplice
for the full story
Main changes:
* Untyped brackets: after the renamer, HsRnBracketOut carries
PendingRnSplices for splices in untyped brackets. In the
typechecker, these pending splices are typechecked quite
straigtforwardly, with no ps_var nonsense.
* Typed brackets: after the renamer typed brackest still look
like HsBracket. The type checker does the ps_var thing.
* In TcRnTypes.ThStage, the Brack constructor, we distinguish
the renaming from typehecking pending-stuff. Much more
perspicuous!
* The "typed" flag is in HsSpliceE, not in HsSplice, because
only expressions can be typed. Patterns, types, declarations
cannot.
There is further improvement to be done to make the handling of
declaration splices more uniform.
>---------------------------------------------------------------
51deeb0db3abac9f4369d3f8a3744e1313ecebf4
compiler/deSugar/Coverage.lhs | 7 +-
compiler/deSugar/DsExpr.lhs | 6 +-
compiler/deSugar/DsMeta.hs | 22 +-
compiler/hsSyn/HsDecls.lhs | 4 +-
compiler/hsSyn/HsExpr.lhs | 70 +++---
compiler/hsSyn/HsExpr.lhs-boot | 5 +-
compiler/hsSyn/HsPat.lhs | 4 +-
compiler/hsSyn/HsTypes.lhs | 6 +-
compiler/hsSyn/HsUtils.lhs | 13 +-
compiler/parser/RdrHsSyn.lhs | 23 +-
compiler/rename/RnExpr.lhs | 4 +-
compiler/rename/RnSplice.lhs | 354 +++++++++++++----------------
compiler/rename/RnSplice.lhs-boot | 7 +-
compiler/rename/RnTypes.lhs | 2 +-
compiler/typecheck/TcExpr.lhs | 26 +--
compiler/typecheck/TcHsSyn.lhs | 28 +--
compiler/typecheck/TcRnDriver.lhs | 11 +-
compiler/typecheck/TcRnTypes.lhs | 30 ++-
compiler/typecheck/TcSplice.lhs | 414 ++++++++++++----------------------
compiler/typecheck/TcSplice.lhs-boot | 15 +-
20 files changed, 428 insertions(+), 623 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 51deeb0db3abac9f4369d3f8a3744e1313ecebf4
More information about the ghc-commits
mailing list