[Git][ghc/ghc][wip/spj-reinstallable-base2] fixup: fix build on Windows
sheaf pushed to branch wip/spj-reinstallable-base2 at Glasgow Haskell Compiler / GHC Commits: 41d3e988 by sheaf at 2026-07-07T18:55:07+02:00 fixup: fix build on Windows - - - - - 17 changed files: - libraries/base/src/Control/Concurrent.hs - libraries/ghc-internal/src/GHC/Internal/Conc/POSIX.hs - libraries/ghc-internal/src/GHC/Internal/ConsoleHandler.hsc - libraries/ghc-internal/src/GHC/Internal/Event/Windows.hsc - libraries/ghc-internal/src/GHC/Internal/Event/Windows/Clock.hs - libraries/ghc-internal/src/GHC/Internal/Event/Windows/ConsoleEvent.hsc - libraries/ghc-internal/src/GHC/Internal/Event/Windows/FFI.hsc - libraries/ghc-internal/src/GHC/Internal/Event/Windows/ManagedThreadPool.hs - libraries/ghc-internal/src/GHC/Internal/Event/Windows/Thread.hs - libraries/ghc-internal/src/GHC/Internal/IO/Encoding.hs - libraries/ghc-internal/src/GHC/Internal/IO/Encoding/CodePage/API.hs - libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/Windows.hsc - libraries/ghc-internal/src/GHC/Internal/IO/Handle/Windows.hs - libraries/ghc-internal/src/GHC/Internal/IO/Windows/Encoding.hs - libraries/ghc-internal/src/GHC/Internal/IO/Windows/Handle.hsc - libraries/ghc-internal/src/GHC/Internal/System/Environment/Blank.hsc - libraries/ghc-internal/src/GHC/Internal/Windows.hs Changes: ===================================== libraries/base/src/Control/Concurrent.hs ===================================== @@ -123,6 +123,11 @@ import GHC.Internal.Foreign.C.Types import System.IO import GHC.Internal.Data.Functor ( void ) import GHC.Internal.Int ( Int64 ) +#if __GLASGOW_HASKELL__ >= 1001 +import qualified GHC.Internal.Stack.Types as Rebindable + ( SrcLoc(..), pushCallStack, emptyCallStack ) +import qualified GHC.Internal.Types as Rebindable +#endif #else import qualified GHC.Internal.Conc.IO as Conc #endif ===================================== libraries/ghc-internal/src/GHC/Internal/Conc/POSIX.hs ===================================== @@ -46,6 +46,7 @@ module GHC.Internal.Conc.POSIX import GHC.Internal.Data.Bits (shiftR) import GHC.Internal.Base (fmap, foldr, otherwise, return, when, ($)) +import qualified GHC.Internal.Base as Rebindable import GHC.Internal.Classes (Eq(..), Ord(..), not) import GHC.Internal.Clock import GHC.Internal.Conc.Sync ===================================== libraries/ghc-internal/src/GHC/Internal/ConsoleHandler.hsc ===================================== @@ -52,8 +52,8 @@ import GHC.Internal.Foreign.Storable import GHC.Internal.Stable import GHC.Internal.Conc.IO import GHC.Internal.Control.Concurrent.MVar -import GHC.Internal.Types (Bool, IO) import GHC.Internal.Base as Rebindable +import qualified GHC.Internal.Num as Rebindable data Handler = Default ===================================== libraries/ghc-internal/src/GHC/Internal/Event/Windows.hsc ===================================== @@ -109,6 +109,7 @@ import GHC.Internal.Base ( Semigroup(..), String, Monoid(..), const, fmap, otherwise, return, when, ($), (.), (++), (>>=), (=<<), (>>), ) +import qualified GHC.Internal.Base as Rebindable import GHC.Internal.Classes (Eq(..), Ord(..), not, (&&), (||)) import GHC.Internal.Conc.Bound import GHC.Internal.Conc.Sync @@ -118,10 +119,15 @@ import GHC.Internal.Num import GHC.Internal.Real import GHC.Internal.Bits import GHC.Internal.Stable +import qualified GHC.Internal.Stack.Types as Rebindable + ( SrcLoc(..), pushCallStack, emptyCallStack ) import GHC.Internal.Enum (maxBound) +import qualified GHC.Internal.Enum as Rebindable import GHC.Internal.Types (Bool(..), Int) +import qualified GHC.Internal.Types as Rebindable import GHC.Internal.Windows import GHC.Internal.List (null) +import qualified GHC.Internal.Show as Rebindable import GHC.Internal.Text.Show import GHC.Internal.Foreign.Ptr import GHC.Internal.Foreign.Marshal.Utils ===================================== libraries/ghc-internal/src/GHC/Internal/Event/Windows/Clock.hs ===================================== @@ -15,9 +15,14 @@ import qualified GHC.Internal.Event.Windows.FFI as FFI import GHC.Internal.Data.Maybe import GHC.Internal.Base (Monad(..), fmap, liftM, ($!)) +import qualified GHC.Internal.Base as Rebindable import GHC.Internal.Err (undefined) +import qualified GHC.Internal.Num as Rebindable import GHC.Internal.Real +import qualified GHC.Internal.Stack.Types as Rebindable + ( SrcLoc(..), pushCallStack, emptyCallStack ) import GHC.Internal.Types (Double, IO) +import qualified GHC.Internal.Types as Rebindable -- | Monotonic clock newtype Clock = Clock (IO Seconds) ===================================== libraries/ghc-internal/src/GHC/Internal/Event/Windows/ConsoleEvent.hsc ===================================== @@ -24,17 +24,21 @@ module GHC.Internal.Event.Windows.ConsoleEvent ( ) where import GHC.Internal.Base (return, ($)) +import qualified GHC.Internal.Base as Rebindable import GHC.Internal.Classes (Eq, Ord) import GHC.Internal.Conc.Sync import GHC.Internal.Data.Maybe (Maybe(..)) import GHC.Internal.Enum (Enum) +import qualified GHC.Internal.Enum as Rebindable import GHC.Internal.Err (errorWithoutStackTrace) import GHC.Internal.IO (IO, unsafePerformIO) import GHC.Internal.MVar import GHC.Internal.Num (Num(..)) import GHC.Internal.Read (Read) +import qualified GHC.Internal.Read as Rebindable import GHC.Internal.Word (Word32) import GHC.Internal.Show (Show) +import qualified GHC.Internal.Show as Rebindable #include <windows.h> ===================================== libraries/ghc-internal/src/GHC/Internal/Event/Windows/FFI.hsc ===================================== @@ -72,9 +72,11 @@ module GHC.Internal.Event.Windows.FFI ( import GHC.Internal.Data.Maybe import GHC.Internal.Base (String, fmap, return, ($), (.), (++), (>>=)) +import qualified GHC.Internal.Base as Rebindable import GHC.Internal.Classes (Eq(..), Ord, (||)) import GHC.Internal.Err (undefined) import GHC.Internal.Num ((*)) +import qualified GHC.Internal.Num as Rebindable import GHC.Internal.Foreign.Marshal.Alloc import GHC.Internal.Foreign.Marshal.Utils import GHC.Internal.Foreign.Storable @@ -84,6 +86,8 @@ import GHC.Internal.Word import GHC.Internal.Stable import GHC.Internal.Real (fromIntegral) import GHC.Internal.Show +import qualified GHC.Internal.Stack.Types as Rebindable + ( SrcLoc(..), pushCallStack, emptyCallStack ) import GHC.Internal.Types (Bool(..), IO) import GHC.Internal.Windows import qualified GHC.Internal.Event.Array as A ===================================== libraries/ghc-internal/src/GHC/Internal/Event/Windows/ManagedThreadPool.hs ===================================== @@ -28,14 +28,18 @@ module GHC.Internal.Event.Windows.ManagedThreadPool ) where import GHC.Internal.Base (return, ($)) +import qualified GHC.Internal.Base as Rebindable import GHC.Internal.Control.Concurrent.MVar import GHC.Internal.Data.Maybe import GHC.Internal.Err (undefined) import GHC.Internal.Num ((-), (+)) +import qualified GHC.Internal.Num as Rebindable import qualified GHC.Internal.Event.Array as A import GHC.Internal.IO.Handle.Internals (debugIO) import GHC.Internal.Conc.Sync (ThreadId(..)) import GHC.Internal.RTS.Flags.Test +import qualified GHC.Internal.Stack.Types as Rebindable + ( SrcLoc(..), pushCallStack, emptyCallStack ) import GHC.Internal.Types (Int, IO) ------------------------------------------------------------------------ ===================================== libraries/ghc-internal/src/GHC/Internal/Event/Windows/Thread.hs ===================================== @@ -8,6 +8,7 @@ module GHC.Internal.Event.Windows.Thread ( ) where import GHC.Internal.Base (return, ($), (>>)) +import qualified GHC.Internal.Base as Rebindable import GHC.Internal.Event.Windows import GHC.Internal.IO import GHC.Internal.MVar ===================================== libraries/ghc-internal/src/GHC/Internal/IO/Encoding.hs ===================================== @@ -47,6 +47,7 @@ import qualified GHC.Internal.IO.Encoding.Iconv as Iconv #else import qualified GHC.Internal.IO.Encoding.CodePage as CodePage import GHC.Internal.Read (readsPrec) +import qualified GHC.Internal.Num as Rebindable #endif import qualified GHC.Internal.IO.Encoding.Latin1 as Latin1 import qualified GHC.Internal.IO.Encoding.UTF8 as UTF8 ===================================== libraries/ghc-internal/src/GHC/Internal/IO/Encoding/CodePage/API.hs ===================================== @@ -2,6 +2,7 @@ {-# LANGUAGE CPP, NoImplicitPrelude, NondecreasingIndentation, RecordWildCards, ScopedTypeVariables, UnboxedTuples #-} +{-# LANGUAGE MagicHash #-} {-# OPTIONS_GHC -Wno-name-shadowing #-} module GHC.Internal.IO.Encoding.CodePage.API ( @@ -23,6 +24,7 @@ import GHC.Internal.Word import GHC.Internal.Base ( String, const, fmap, otherwise, return, when, ($), (.), (>>), ) +import qualified GHC.Internal.Base as Rebindable ((>>=)) import GHC.Internal.Classes (Eq(..), Ord(..), not, (&&), (||)) import GHC.Internal.Err (errorWithoutStackTrace, undefined) import GHC.Internal.List @@ -32,8 +34,11 @@ import GHC.Internal.IO.Encoding.Types import GHC.Internal.IO.Encoding.UTF16 import GHC.Internal.Num import GHC.Internal.Show +import qualified GHC.Internal.Stack.Types as Rebindable + ( SrcLoc(..), pushCallStack, emptyCallStack ) import GHC.Internal.Real import GHC.Internal.Types (Bool(..), Char, Int, IO(..), Ordering(..)) +import qualified GHC.Internal.Types as Rebindable import GHC.Internal.Windows hiding (LPCSTR) import GHC.Internal.ForeignPtr (castForeignPtr) ===================================== libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/Windows.hsc ===================================== @@ -16,6 +16,7 @@ import GHC.Internal.Base as Rebindable #include <windows.h> +import GHC.Internal.Base as Rebindable import GHC.Internal.Data.Bits import GHC.Internal.Data.Function import GHC.Internal.IO.Handle.Windows (handleToHANDLE) @@ -30,6 +31,7 @@ import GHC.Internal.IO.Handle.FD import GHC.Internal.IO.Handle.Types (Handle) import GHC.Internal.IO.Handle.Lock.Common (LockMode(..)) import GHC.Internal.IO.SubSystem +import qualified GHC.Internal.Num as Rebindable import GHC.Internal.Windows lockImpl :: Handle -> String -> LockMode -> Bool -> IO Bool ===================================== libraries/ghc-internal/src/GHC/Internal/IO/Handle/Windows.hs ===================================== @@ -25,6 +25,8 @@ import GHC.Internal.Data.Maybe import GHC.Internal.Data.Typeable import GHC.Internal.Base (String, fmap, otherwise, return, ($)) +import qualified GHC.Internal.Base as Rebindable +import qualified GHC.Internal.Data.Typeable.Internal as Rebindable import GHC.Internal.MVar import GHC.Internal.IO import GHC.Internal.IO.BufferedIO hiding (flushWriteBuffer) @@ -35,6 +37,8 @@ import GHC.Internal.IO.IOMode import GHC.Internal.IO.Handle.Types import GHC.Internal.IO.Handle.Internals import qualified GHC.Internal.IO.Windows.Handle as Win +import qualified GHC.Internal.Stack.Types as Rebindable + ( SrcLoc(..), pushCallStack, emptyCallStack ) import GHC.Internal.Types (Bool(..)) -- --------------------------------------------------------------------------- ===================================== libraries/ghc-internal/src/GHC/Internal/IO/Windows/Encoding.hs ===================================== @@ -25,8 +25,11 @@ module GHC.Internal.IO.Windows.Encoding ) where import GHC.Internal.Base (String, assert, return, ($), (.)) +import qualified GHC.Internal.Base as Rebindable ((>>=)) import GHC.Internal.Classes (Eq(..), Ord(..)) +import qualified GHC.Internal.Num as Rebindable (fromInteger) import GHC.Internal.Types (Int) +import qualified GHC.Internal.Types as Rebindable import GHC.Internal.Word (Word8, Word16) import GHC.Internal.Foreign.C.Types (CInt(..)) import GHC.Internal.Foreign.C.String (peekCAStringLen, peekCWStringLen, ===================================== libraries/ghc-internal/src/GHC/Internal/IO/Windows/Handle.hsc ===================================== @@ -63,14 +63,20 @@ import GHC.Internal.Base ( const, flip, fmap, liftM2, otherwise, return, when, ($), ($!), (.), (=<<), (>>), ) +import qualified GHC.Internal.Base as Rebindable import GHC.Internal.Classes (Eq(..), Ord(..), not, (&&), (||)) import GHC.Internal.Data.Maybe (Maybe(..)) import GHC.Internal.Enum import GHC.Internal.Err (error, undefined) import GHC.Internal.Num import GHC.Internal.Real +import qualified GHC.Internal.Show as Rebindable +import qualified GHC.Internal.Stack.Types as Rebindable + ( SrcLoc(..), pushCallStack, emptyCallStack ) import GHC.Internal.List import GHC.Internal.Types (Bool(..), Int) +import qualified GHC.Internal.Types as Rebindable +import qualified GHC.Internal.Data.Typeable.Internal as Rebindable import GHC.Internal.Word (Word8, Word16, Word64) import GHC.Internal.IO hiding (mask) ===================================== libraries/ghc-internal/src/GHC/Internal/System/Environment/Blank.hsc ===================================== @@ -47,6 +47,7 @@ import GHC.Internal.Foreign.C.String import GHC.Internal.Base (String, otherwise, ($)) #if defined(mingw32_HOST_OS) import GHC.Internal.Base ((.)) +import qualified GHC.Internal.Num as Rebindable import GHC.Internal.Foreign.Ptr import GHC.Internal.Windows import GHC.Internal.Control.Monad ===================================== libraries/ghc-internal/src/GHC/Internal/Windows.hs ===================================== @@ -78,10 +78,8 @@ module GHC.Internal.Windows ( nullHANDLE, ) where -import GHC.Internal.Classes (Eq(..), not) import GHC.Internal.Data.Bits (finiteBitSize, shiftL, shiftR, (.|.), (.&.)) import GHC.Internal.Err (undefined) -import GHC.Internal.Types (Bool(..)) import GHC.Internal.Unicode (isSpace) import GHC.Internal.Data.OldList import GHC.Internal.Data.Maybe @@ -96,6 +94,7 @@ import GHC.Internal.Enum (maxBound) import GHC.Internal.IO import GHC.Internal.Num import GHC.Internal.Real (fromIntegral) +import qualified GHC.Internal.Stack.Types as Rebindable (SrcLoc(..), pushCallStack, emptyCallStack) import GHC.Internal.System.IO.Error import qualified GHC.Internal.Numeric View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/41d3e988c8af9b9da5f6caa0f9d907dc... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/41d3e988c8af9b9da5f6caa0f9d907dc... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
sheaf (@sheaf)