[Git][ghc/ghc][wip/dcoutts/io-manager-feature-bitset] 2 commits: fixup Use rts_IOManagerFeatures bitset in GHC.Internal.IO.SubSystem
Duncan Coutts pushed to branch wip/dcoutts/io-manager-feature-bitset at Glasgow Haskell Compiler / GHC Commits: b107b781 by Duncan Coutts at 2026-10-12T22:09:35+01:00 fixup Use rts_IOManagerFeatures bitset in GHC.Internal.IO.SubSystem - - - - - ffcb0c30 by Duncan Coutts at 2026-10-12T22:10:20+01:00 fixup In GHC.Internal.Conc.IO more uniform dispatch to alternatives - - - - - 3 changed files: - libraries/ghc-internal/src/GHC/Internal/Conc/IO.hs - libraries/ghc-internal/src/GHC/Internal/Conc/Windows.hs - libraries/ghc-internal/src/GHC/Internal/IO/SubSystem.hs Changes: ===================================== libraries/ghc-internal/src/GHC/Internal/Conc/IO.hs ===================================== @@ -74,17 +74,9 @@ import GHC.Internal.Real ( fromIntegral ) import GHC.Internal.System.Posix.Types #if defined(mingw32_HOST_OS) -import qualified GHC.Internal.Conc.Windows as IOMgr import GHC.Internal.Conc.Windows (asyncRead, asyncWrite, asyncDoProc, asyncReadBA, asyncWriteBA, ConsoleEvent(..), win32ConsoleHandler, toWin32ConsoleEvent) -#elif !defined(javascript_HOST_ARCH) -import qualified GHC.Internal.Event.Thread as IOMgr -#endif - -#if defined(wasm32_HOST_ARCH) -import qualified GHC.Internal.Wasm.Prim.Conc as Wasm -import qualified GHC.Internal.Wasm.Prim.Flag as Wasm #endif -- A switch to control support for calling in-library I/O managers. @@ -98,6 +90,19 @@ import qualified GHC.Internal.Wasm.Prim.Flag as Wasm #define HAVE_IOMGR_IN_LIB #endif +#if defined(HAVE_IOMGR_IN_LIB) +#if defined(mingw32_HOST_OS) +import qualified GHC.Internal.Conc.Windows as IOMgr +#else +import qualified GHC.Internal.Event.Thread as IOMgr +#endif +#endif + +#if defined(wasm32_HOST_ARCH) +import qualified GHC.Internal.Wasm.Prim.Conc as Wasm (threadDelay) +import qualified GHC.Internal.Wasm.Prim.Flag as Wasm (isJSFFIUsed) +#endif + ensureIOManagerIsRunning :: IO () ensureIOManagerIsRunning #if defined(HAVE_IOMGR_IN_LIB) ===================================== libraries/ghc-internal/src/GHC/Internal/Conc/Windows.hs ===================================== @@ -42,7 +42,7 @@ module GHC.Internal.Conc.Windows , module GHC.Internal.Event.Windows.ConsoleEvent ) where -import GHC.Internal.Base (($)) +import GHC.Internal.Base (($), return) import qualified GHC.Internal.Conc.POSIX as POSIX import qualified GHC.Internal.Event.Windows.Thread as WINIO import GHC.Internal.Event.Windows.ConsoleEvent ===================================== libraries/ghc-internal/src/GHC/Internal/IO/SubSystem.hs ===================================== @@ -4,6 +4,11 @@ {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE MagicHash #-} +#if defined(javascript_HOST_ARCH) +-- To avoid sprinkling cpp all over the module +{-# OPTIONS_GHC -Wno-unused-imports -Wno-unused-top-binds #-} +#endif + ----------------------------------------------------------------------------- -- | -- Module : GHC.Internal.IO.SubSystem View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7998916fcd9b7fee0a4e09a3621fd46... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7998916fcd9b7fee0a4e09a3621fd46... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Duncan Coutts (@dcoutts)