diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-11-14 19:30:50 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-16 14:50:06 -0500 |
commit | 37cfe3c0f4fb16189bbe3bb735f758cd6e3d9157 (patch) | |
tree | f4084bab4c1d5a71a24d8b67677bef5061a6b08a /compiler/GHC/Parser.y | |
parent | 08bf28819b78e740550a73a90eda62cce8d21c90 (diff) | |
download | haskell-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.y | 2 |
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 } |