[commit: ghc] wip/T12357-built-in-map: DsExpr: Remove unnecessary usage of concatFS (5446684)
git at git.haskell.org
git at git.haskell.org
Fri Jul 8 14:11:10 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T12357-built-in-map
Link : http://ghc.haskell.org/trac/ghc/changeset/54466843f309aa31c41ceebb0f59410dc40e5e80/ghc
>---------------------------------------------------------------
commit 54466843f309aa31c41ceebb0f59410dc40e5e80
Author: Ben Gamari <ben at smart-cactus.org>
Date: Fri Jul 8 16:14:29 2016 +0200
DsExpr: Remove unnecessary usage of concatFS
Producing a FastString and then immediately unpacking it is rather silly
>---------------------------------------------------------------
54466843f309aa31c41ceebb0f59410dc40e5e80
compiler/deSugar/DsExpr.hs | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/compiler/deSugar/DsExpr.hs b/compiler/deSugar/DsExpr.hs
index 85177ee..b01b0e6 100644
--- a/compiler/deSugar/DsExpr.hs
+++ b/compiler/deSugar/DsExpr.hs
@@ -470,12 +470,10 @@ dsExpr (HsStatic _ expr@(L loc _)) = do
mkStaticPtrFingerprint :: Module -> DsM Fingerprint
mkStaticPtrFingerprint this_mod = do
n <- mkGenPerModuleNum this_mod
- return $ fingerprintString $ unpackFS $ concatFS
- [ unitIdFS $ moduleUnitId this_mod
- , fsLit ":"
- , moduleNameFS $ moduleName this_mod
- , fsLit ":"
- , mkFastString $ show n
+ return $ fingerprintString $ intercalate ":"
+ [ unitIdString $ moduleUnitId this_mod
+ , moduleNameString $ moduleName this_mod
+ , show n
]
mkGenPerModuleNum :: Module -> DsM Int
More information about the ghc-commits
mailing list