[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: doc: Fix type error in hs_try_putmvar example

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Sun May 5 04:50:57 UTC 2024



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
06f7db40 by Teo Camarasu at 2024-05-05T00:19:38-04:00
doc: Fix type error in hs_try_putmvar example
- - - - -
fc9b9c68 by Moritz Schuler at 2024-05-05T00:50:50-04:00
Fix parsing of module names in CLI arguments
  closes issue #24732

- - - - -
7d772b1b by Ben Gamari at 2024-05-05T00:50:51-04:00
ghc-platform: Add Setup.hs

The Hadrian bootstrapping script relies upon `Setup.hs` to drive its
build.

Addresses #24761.

- - - - -


6 changed files:

- compiler/Language/Haskell/Syntax/Module/Name.hs
- docs/users_guide/exts/ffi.rst
- + libraries/ghc-platform/Setup.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` "_.'")
 


=====================================
docs/users_guide/exts/ffi.rst
=====================================
@@ -998,7 +998,7 @@ the data.  We can do it like this:
        sp <- newStablePtrPrimMVar mvar
        fp <- mallocForeignPtr
        withForeignPtr fp $ \presult -> do
-         cap <- threadCapability =<< myThreadId
+         (cap, _) <- threadCapability =<< myThreadId
          scheduleCallback sp cap presult
          takeMVar mvar `onException`
            forkIO (do takeMVar mvar; touchForeignPtr fp)


=====================================
libraries/ghc-platform/Setup.hs
=====================================
@@ -0,0 +1,6 @@
+module Main (main) where
+
+import Distribution.Simple
+
+main :: IO ()
+main = defaultMain


=====================================
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/-/compare/46b618dd0cd7d894ce5da3319ed0da5963d87a9e...7d772b1b152264ba82bcd73457e63f3bdae0e7e0

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/46b618dd0cd7d894ce5da3319ed0da5963d87a9e...7d772b1b152264ba82bcd73457e63f3bdae0e7e0
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/3e8224e5/attachment-0001.html>


More information about the ghc-commits mailing list