summaryrefslogtreecommitdiff
path: root/compiler/GHC/CoreToByteCode.hs
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2020-02-17 09:56:33 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-20 21:20:45 -0500
commit65b7256a88ae2bd878da5d026e4183cba6f6eedf (patch)
treefeae01641c4fcbaa438dda9298d7d9ca2430eb85 /compiler/GHC/CoreToByteCode.hs
parentc8439fc789ff00cfdd453d2425d2146df69e0729 (diff)
downloadhaskell-65b7256a88ae2bd878da5d026e4183cba6f6eedf.tar.gz
Use concatMap(M) instead of `concat . map` and the monadic variant
Diffstat (limited to 'compiler/GHC/CoreToByteCode.hs')
-rw-r--r--compiler/GHC/CoreToByteCode.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/CoreToByteCode.hs b/compiler/GHC/CoreToByteCode.hs
index 73a54fb3e2..318364fd7c 100644
--- a/compiler/GHC/CoreToByteCode.hs
+++ b/compiler/GHC/CoreToByteCode.hs
@@ -1116,7 +1116,7 @@ doCase d s p (_,scrut) bndr alts is_unboxed_tuple
binds = Map.toList p
-- NB: unboxed tuple cases bind the scrut binder to the same offset
-- as one of the alt binders, so we have to remove any duplicates here:
- rel_slots = nub $ map fromIntegral $ concat (map spread binds)
+ rel_slots = nub $ map fromIntegral $ concatMap spread binds
spread (id, offset) | isFollowableArg (bcIdArgRep id) = [ rel_offset ]
| otherwise = []
where rel_offset = trunc16W $ bytesToWords dflags (d - offset)