[Git][ghc/ghc][master] Fix parsing of module names in CLI arguments
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Sun May 5 10:31:29 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
af000532 by Moritz Schuler at 2024-05-05T06:30:58-04:00
Fix parsing of module names in CLI arguments
closes issue #24732
- - - - -
4 changed files:
- compiler/Language/Haskell/Syntax/Module/Name.hs
- + testsuite/tests/rename/should_compile/T24732.hs
- + testsuite/tests/rename/should_compile/T24732.stdout
- testsuite/tests/rename/should_compile/all.T
Changes:
=====================================
compiler/Language/Haskell/Syntax/Module/Name.hs
=====================================
@@ -56,5 +56,5 @@ moduleNameColons = dots_to_colons . moduleNameString
parseModuleName :: Parse.ReadP ModuleName
parseModuleName = fmap mkModuleName
- $ Parse.munch1 (\c -> isAlphaNum c || c `elem` "_.")
+ $ Parse.munch1 (\c -> isAlphaNum c || c `elem` "_.'")
=====================================
testsuite/tests/rename/should_compile/T24732.hs
=====================================
@@ -0,0 +1,4 @@
+import P'
+
+main :: IO ()
+main = printf "Hello World\n"
\ No newline at end of file
=====================================
testsuite/tests/rename/should_compile/T24732.stdout
=====================================
@@ -0,0 +1 @@
+Hello World
=====================================
testsuite/tests/rename/should_compile/all.T
=====================================
@@ -223,3 +223,4 @@ test('T22478a', req_th, compile, [''])
test('RecordWildCardDeprecation', normal, multimod_compile, ['RecordWildCardDeprecation', '-Wno-duplicate-exports'])
test('T14032b', normal, compile_and_run, [''])
test('T14032d', normal, compile, [''])
+test('T24732', normal, compile_and_run, ['-package "base(Prelude, Text.Printf as P\')"'])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/af0005324ddc64daf717f5bdaa953ec26a9a2346
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/af0005324ddc64daf717f5bdaa953ec26a9a2346
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240505/ee51960d/attachment-0001.html>
More information about the ghc-commits
mailing list