diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-10-25 21:20:37 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-10-27 02:11:07 +0200 |
commit | 08ad4eaa280418164aee4f6fa7d2c4b3fbbbd3af (patch) | |
tree | 2d3bb3ec1196bcc928e6d338c377706cf0f3bce2 /compiler/GHC/Hs/Utils.hs | |
parent | 0270cc54481bef9630274e77c2750940c1a4eff5 (diff) | |
download | haskell-wip/strings-refactor2.tar.gz |
Minor SDoc-related cleanupwip/strings-refactor2
* Rename pprCLabel to pprCLabelStyle, and use the name pprCLabel
for a function using CStyle (analogous to pprAsmLabel)
* Move LabelStyle to the CLabel module, it no longer needs to be in Outputable.
* Move calls to 'text' right next to literals, to make sure the text/str
rule is triggered.
* Remove FastString/String roundtrip in Tc.Deriv.Generate
* Introduce showSDocForUser', which abstracts over a pattern in
GHCi.UI
Diffstat (limited to 'compiler/GHC/Hs/Utils.hs')
-rw-r--r-- | compiler/GHC/Hs/Utils.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/GHC/Hs/Utils.hs b/compiler/GHC/Hs/Utils.hs index eb708cd295..6e8814321c 100644 --- a/compiler/GHC/Hs/Utils.hs +++ b/compiler/GHC/Hs/Utils.hs @@ -66,7 +66,7 @@ module GHC.Hs.Utils( spanHsLocaLBinds, -- * Literals - mkHsIntegral, mkHsFractional, mkHsIsString, mkHsString, mkHsStringPrimLit, + mkHsIntegral, mkHsFractional, mkHsIsString, mkHsString, mkHsStringFS, mkHsStringPrimLit, mkHsCharPrimLit, -- * Patterns @@ -454,6 +454,9 @@ mkHsOpApp e1 op e2 = OpApp noAnn e1 (noLocA (HsVar noExtField (noLocA op))) e2 mkHsString :: String -> HsLit (GhcPass p) mkHsString s = HsString NoSourceText (mkFastString s) +mkHsStringFS :: FastString -> HsLit (GhcPass p) +mkHsStringFS s = HsString NoSourceText s + mkHsStringPrimLit :: FastString -> HsLit (GhcPass p) mkHsStringPrimLit fs = HsStringPrim NoSourceText (bytesFS fs) |