diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-11-04 14:58:13 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-11-04 14:58:28 +0000 |
commit | 6a1c05f01429511984b63c49e6d802673ca5f4a1 (patch) | |
tree | ec86ba5b3d6f66a4a3755e59c996baca8d478041 /compiler/hsSyn/HsUtils.lhs | |
parent | 64dc4d1085a7db375f6532362bf7e23fac3a25eb (diff) | |
download | haskell-6a1c05f01429511984b63c49e6d802673ca5f4a1.tar.gz |
A little refactoring of HsSplice and friends
Plus adding comments.
The most substantive change is that PendingTcSplice becomes a proper
data type rather than a pair; and PendingRnSplice uses it
Diffstat (limited to 'compiler/hsSyn/HsUtils.lhs')
-rw-r--r-- | compiler/hsSyn/HsUtils.lhs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/hsSyn/HsUtils.lhs b/compiler/hsSyn/HsUtils.lhs index eb348d1eba..12e2388684 100644 --- a/compiler/hsSyn/HsUtils.lhs +++ b/compiler/hsSyn/HsUtils.lhs @@ -282,6 +282,9 @@ mkHsOpApp e1 op e2 = OpApp e1 (noLoc (HsVar op)) (error "mkOpApp:fixity") e2 mkHsSplice :: LHsExpr RdrName -> HsSplice RdrName mkHsSplice e = HsSplice unqualSplice e +unqualSplice :: RdrName +unqualSplice = mkRdrUnqual (mkVarOccFS (fsLit "splice")) + mkHsSpliceE :: LHsExpr RdrName -> HsExpr RdrName mkHsSpliceE e = HsSpliceE False (mkHsSplice e) @@ -291,11 +294,6 @@ mkHsSpliceTE e = HsSpliceE True (mkHsSplice e) mkHsSpliceTy :: LHsExpr RdrName -> HsType RdrName mkHsSpliceTy e = HsSpliceTy (mkHsSplice e) placeHolderKind -unqualSplice :: RdrName -unqualSplice = mkRdrUnqual (mkVarOccFS (fsLit "splice")) - -- A name (uniquified later) to - -- identify the splice - mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsQuasiQuote RdrName mkHsQuasiQuote quoter span quote = HsQuasiQuote quoter span quote |