summaryrefslogtreecommitdiff
path: root/compiler/deSugar/DsMonad.hs
diff options
context:
space:
mode:
authorSylvain Henry <hsyl20@gmail.com>2018-11-22 11:31:16 -0500
committerBen Gamari <ben@smart-cactus.org>2018-11-22 12:11:15 -0500
commit13bb4bf44e6e690133be334bbf0c63fcae5db34a (patch)
treeee7a9a9f60ca936b16cc15a46c758d4dc51abfd7 /compiler/deSugar/DsMonad.hs
parentf5fbecc85967218fd8ba6512f10eea2daf2812ac (diff)
downloadhaskell-13bb4bf44e6e690133be334bbf0c63fcae5db34a.tar.gz
Rename literal constructors
In a previous patch we replaced some built-in literal constructors (MachInt, MachWord, etc.) with a single LitNumber constructor. In this patch we replace the `Mach` prefix of the remaining constructors with `Lit` for consistency (e.g., LitChar, LitLabel, etc.). Sadly the name `LitString` was already taken for a kind of FastString and it would become misleading to have both `LitStr` (literal constructor renamed after `MachStr`) and `LitString` (FastString variant). Hence this patch renames the FastString variant `PtrString` (which is more accurate) and the literal string constructor now uses the least surprising `LitString` name. Both `Literal` and `LitString/PtrString` have recently seen breaking changes so doing this kind of renaming now shouldn't harm much. Reviewers: hvr, goldfire, bgamari, simonmar, jrtc27, tdammers Subscribers: tdammers, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4881
Diffstat (limited to 'compiler/deSugar/DsMonad.hs')
-rw-r--r--compiler/deSugar/DsMonad.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/deSugar/DsMonad.hs b/compiler/deSugar/DsMonad.hs
index 921276e4d8..e93b2c30d6 100644
--- a/compiler/deSugar/DsMonad.hs
+++ b/compiler/deSugar/DsMonad.hs
@@ -82,7 +82,7 @@ import ErrUtils
import FastString
import Var (EvVar)
import UniqFM ( lookupWithDefaultUFM )
-import Literal ( mkMachString )
+import Literal ( mkLitString )
import CostCentreState
import Data.IORef
@@ -609,5 +609,5 @@ pprRuntimeTrace str doc expr = do
dflags <- getDynFlags
let message :: CoreExpr
message = App (Var unpackCStringId) $
- Lit $ mkMachString $ showSDoc dflags (hang (text str) 4 doc)
+ Lit $ mkLitString $ showSDoc dflags (hang (text str) 4 doc)
return $ mkApps (Var traceId) [Type (exprType expr), message, expr]