summaryrefslogtreecommitdiff
path: root/compiler/GHC/Parser.y
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2022-11-14 19:30:50 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-16 14:50:06 -0500
commit37cfe3c0f4fb16189bbe3bb735f758cd6e3d9157 (patch)
treef4084bab4c1d5a71a24d8b67677bef5061a6b08a /compiler/GHC/Parser.y
parent08bf28819b78e740550a73a90eda62cce8d21c90 (diff)
downloadhaskell-37cfe3c0f4fb16189bbe3bb735f758cd6e3d9157.tar.gz
Misc cleanup
* Replace catMaybes . map f with mapMaybe f * Use concatFS to concatenate multiple FastStrings * Fix documentation of -exclude-module * Cleanup getIgnoreCount in GHCi.UI
Diffstat (limited to 'compiler/GHC/Parser.y')
-rw-r--r--compiler/GHC/Parser.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Parser.y b/compiler/GHC/Parser.y
index beff8acf64..dda119bafd 100644
--- a/compiler/GHC/Parser.y
+++ b/compiler/GHC/Parser.y
@@ -825,7 +825,7 @@ HYPHEN :: { [AddEpAnn] }
litpkgname :: { Located FastString }
: litpkgname_segment { $1 }
-- a bit of a hack, means p - b is parsed same as p-b, enough for now.
- | litpkgname_segment HYPHEN litpkgname { sLL $1 $> $ appendFS (unLoc $1) (consFS '-' (unLoc $3)) }
+ | litpkgname_segment HYPHEN litpkgname { sLL $1 $> $ concatFS [unLoc $1, fsLit "-", (unLoc $3)] }
mayberns :: { Maybe [LRenaming] }
: {- empty -} { Nothing }