diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2013-11-25 16:58:28 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2013-11-25 16:58:43 +0000 |
commit | 51deeb0db3abac9f4369d3f8a3744e1313ecebf4 (patch) | |
tree | fde7b556b53bdbf5f6f0adaecdd14e723acb27af /compiler/hsSyn/HsExpr.lhs-boot | |
parent | f8b25c30fe593a1195a4f4840b8773595dd0f2e0 (diff) | |
download | haskell-51deeb0db3abac9f4369d3f8a3744e1313ecebf4.tar.gz |
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.
Diffstat (limited to 'compiler/hsSyn/HsExpr.lhs-boot')
-rw-r--r-- | compiler/hsSyn/HsExpr.lhs-boot | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/hsSyn/HsExpr.lhs-boot b/compiler/hsSyn/HsExpr.lhs-boot index a2ef6528b8..027fd7e0a0 100644 --- a/compiler/hsSyn/HsExpr.lhs-boot +++ b/compiler/hsSyn/HsExpr.lhs-boot @@ -33,7 +33,6 @@ instance Data i => Data (HsCmd i) instance (Data i, Data body) => Data (MatchGroup i body) instance (Data i, Data body) => Data (GRHSs i body) -instance OutputableBndr id => Outputable (HsSplice id) instance OutputableBndr id => Outputable (HsExpr id) instance OutputableBndr id => Outputable (HsCmd id) @@ -46,8 +45,8 @@ pprLExpr :: (OutputableBndr i) => pprExpr :: (OutputableBndr i) => HsExpr i -> SDoc -pprSplice :: (OutputableBndr i) => - HsSplice i -> SDoc +pprUntypedSplice :: (OutputableBndr i) => + HsSplice i -> SDoc pprPatBind :: (OutputableBndr bndr, OutputableBndr id, Outputable body) => LPat bndr -> GRHSs id body -> SDoc |