sheaf pushed to branch wip/spj-reinstallable-base2 at Glasgow Haskell Compiler / GHC

Commits:

17 changed files:

Changes:

  • libraries/base/src/Control/Concurrent.hs
    ... ... @@ -123,6 +123,11 @@ import GHC.Internal.Foreign.C.Types
    123 123
     import System.IO
    
    124 124
     import GHC.Internal.Data.Functor ( void )
    
    125 125
     import GHC.Internal.Int ( Int64 )
    
    126
    +#if __GLASGOW_HASKELL__ >= 1001
    
    127
    +import qualified GHC.Internal.Stack.Types as Rebindable
    
    128
    +  ( SrcLoc(..), pushCallStack, emptyCallStack )
    
    129
    +import qualified GHC.Internal.Types as Rebindable
    
    130
    +#endif
    
    126 131
     #else
    
    127 132
     import qualified GHC.Internal.Conc.IO as Conc
    
    128 133
     #endif
    

  • libraries/ghc-internal/src/GHC/Internal/Conc/POSIX.hs
    ... ... @@ -46,6 +46,7 @@ module GHC.Internal.Conc.POSIX
    46 46
     
    
    47 47
     import GHC.Internal.Data.Bits (shiftR)
    
    48 48
     import GHC.Internal.Base (fmap, foldr, otherwise, return, when, ($))
    
    49
    +import qualified GHC.Internal.Base as Rebindable
    
    49 50
     import GHC.Internal.Classes (Eq(..), Ord(..), not)
    
    50 51
     import GHC.Internal.Clock
    
    51 52
     import GHC.Internal.Conc.Sync
    

  • libraries/ghc-internal/src/GHC/Internal/ConsoleHandler.hsc
    ... ... @@ -52,8 +52,8 @@ import GHC.Internal.Foreign.Storable
    52 52
     import GHC.Internal.Stable
    
    53 53
     import GHC.Internal.Conc.IO
    
    54 54
     import GHC.Internal.Control.Concurrent.MVar
    
    55
    -import GHC.Internal.Types (Bool, IO)
    
    56 55
     import GHC.Internal.Base as Rebindable
    
    56
    +import qualified GHC.Internal.Num as Rebindable
    
    57 57
     
    
    58 58
     data Handler
    
    59 59
      = Default
    

  • libraries/ghc-internal/src/GHC/Internal/Event/Windows.hsc
    ... ... @@ -109,6 +109,7 @@ import GHC.Internal.Base (
    109 109
         Semigroup(..), String, Monoid(..), const, fmap, otherwise, return, when,
    
    110 110
         ($), (.), (++), (>>=), (=<<), (>>),
    
    111 111
       )
    
    112
    +import qualified GHC.Internal.Base as Rebindable
    
    112 113
     import GHC.Internal.Classes (Eq(..), Ord(..), not, (&&), (||))
    
    113 114
     import GHC.Internal.Conc.Bound
    
    114 115
     import GHC.Internal.Conc.Sync
    
    ... ... @@ -118,10 +119,15 @@ import GHC.Internal.Num
    118 119
     import GHC.Internal.Real
    
    119 120
     import GHC.Internal.Bits
    
    120 121
     import GHC.Internal.Stable
    
    122
    +import qualified GHC.Internal.Stack.Types as Rebindable
    
    123
    +  ( SrcLoc(..), pushCallStack, emptyCallStack )
    
    121 124
     import GHC.Internal.Enum (maxBound)
    
    125
    +import qualified GHC.Internal.Enum as Rebindable
    
    122 126
     import GHC.Internal.Types (Bool(..), Int)
    
    127
    +import qualified GHC.Internal.Types as Rebindable
    
    123 128
     import GHC.Internal.Windows
    
    124 129
     import GHC.Internal.List (null)
    
    130
    +import qualified GHC.Internal.Show as Rebindable
    
    125 131
     import GHC.Internal.Text.Show
    
    126 132
     import GHC.Internal.Foreign.Ptr
    
    127 133
     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
    15 15
     
    
    16 16
     import GHC.Internal.Data.Maybe
    
    17 17
     import GHC.Internal.Base (Monad(..), fmap, liftM, ($!))
    
    18
    +import qualified GHC.Internal.Base as Rebindable
    
    18 19
     import GHC.Internal.Err (undefined)
    
    20
    +import qualified GHC.Internal.Num as Rebindable
    
    19 21
     import GHC.Internal.Real
    
    22
    +import qualified GHC.Internal.Stack.Types as Rebindable
    
    23
    +  ( SrcLoc(..), pushCallStack, emptyCallStack )
    
    20 24
     import GHC.Internal.Types (Double, IO)
    
    25
    +import qualified GHC.Internal.Types as Rebindable
    
    21 26
     
    
    22 27
     -- | Monotonic clock
    
    23 28
     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 (
    24 24
     ) where
    
    25 25
     
    
    26 26
     import GHC.Internal.Base (return, ($))
    
    27
    +import qualified GHC.Internal.Base as Rebindable
    
    27 28
     import GHC.Internal.Classes (Eq, Ord)
    
    28 29
     import GHC.Internal.Conc.Sync
    
    29 30
     import GHC.Internal.Data.Maybe (Maybe(..))
    
    30 31
     import GHC.Internal.Enum (Enum)
    
    32
    +import qualified GHC.Internal.Enum as Rebindable
    
    31 33
     import GHC.Internal.Err (errorWithoutStackTrace)
    
    32 34
     import GHC.Internal.IO (IO, unsafePerformIO)
    
    33 35
     import GHC.Internal.MVar
    
    34 36
     import GHC.Internal.Num (Num(..))
    
    35 37
     import GHC.Internal.Read (Read)
    
    38
    +import qualified GHC.Internal.Read as Rebindable
    
    36 39
     import GHC.Internal.Word (Word32)
    
    37 40
     import GHC.Internal.Show (Show)
    
    41
    +import qualified GHC.Internal.Show as Rebindable
    
    38 42
     
    
    39 43
     #include <windows.h>
    
    40 44
     
    

  • libraries/ghc-internal/src/GHC/Internal/Event/Windows/FFI.hsc
    ... ... @@ -72,9 +72,11 @@ module GHC.Internal.Event.Windows.FFI (
    72 72
     
    
    73 73
     import GHC.Internal.Data.Maybe
    
    74 74
     import GHC.Internal.Base (String, fmap, return, ($), (.), (++), (>>=))
    
    75
    +import qualified GHC.Internal.Base as Rebindable
    
    75 76
     import GHC.Internal.Classes (Eq(..), Ord, (||))
    
    76 77
     import GHC.Internal.Err (undefined)
    
    77 78
     import GHC.Internal.Num ((*))
    
    79
    +import qualified GHC.Internal.Num as Rebindable
    
    78 80
     import GHC.Internal.Foreign.Marshal.Alloc
    
    79 81
     import GHC.Internal.Foreign.Marshal.Utils
    
    80 82
     import GHC.Internal.Foreign.Storable
    
    ... ... @@ -84,6 +86,8 @@ import GHC.Internal.Word
    84 86
     import GHC.Internal.Stable
    
    85 87
     import GHC.Internal.Real (fromIntegral)
    
    86 88
     import GHC.Internal.Show
    
    89
    +import qualified GHC.Internal.Stack.Types as Rebindable
    
    90
    +  ( SrcLoc(..), pushCallStack, emptyCallStack )
    
    87 91
     import GHC.Internal.Types (Bool(..), IO)
    
    88 92
     import GHC.Internal.Windows
    
    89 93
     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
    28 28
       ) where
    
    29 29
     
    
    30 30
     import GHC.Internal.Base (return, ($))
    
    31
    +import qualified GHC.Internal.Base as Rebindable
    
    31 32
     import GHC.Internal.Control.Concurrent.MVar
    
    32 33
     import GHC.Internal.Data.Maybe
    
    33 34
     import GHC.Internal.Err (undefined)
    
    34 35
     import GHC.Internal.Num ((-), (+))
    
    36
    +import qualified GHC.Internal.Num as Rebindable
    
    35 37
     import qualified GHC.Internal.Event.Array as A
    
    36 38
     import GHC.Internal.IO.Handle.Internals (debugIO)
    
    37 39
     import GHC.Internal.Conc.Sync (ThreadId(..))
    
    38 40
     import GHC.Internal.RTS.Flags.Test
    
    41
    +import qualified GHC.Internal.Stack.Types as Rebindable
    
    42
    +  ( SrcLoc(..), pushCallStack, emptyCallStack )
    
    39 43
     import GHC.Internal.Types (Int, IO)
    
    40 44
     
    
    41 45
     ------------------------------------------------------------------------
    

  • libraries/ghc-internal/src/GHC/Internal/Event/Windows/Thread.hs
    ... ... @@ -8,6 +8,7 @@ module GHC.Internal.Event.Windows.Thread (
    8 8
     ) where
    
    9 9
     
    
    10 10
     import GHC.Internal.Base (return, ($), (>>))
    
    11
    +import qualified GHC.Internal.Base as Rebindable
    
    11 12
     import GHC.Internal.Event.Windows
    
    12 13
     import GHC.Internal.IO
    
    13 14
     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
    47 47
     #else
    
    48 48
     import qualified GHC.Internal.IO.Encoding.CodePage as CodePage
    
    49 49
     import GHC.Internal.Read (readsPrec)
    
    50
    +import qualified GHC.Internal.Num as Rebindable
    
    50 51
     #endif
    
    51 52
     import qualified GHC.Internal.IO.Encoding.Latin1 as Latin1
    
    52 53
     import qualified GHC.Internal.IO.Encoding.UTF8   as UTF8
    

  • libraries/ghc-internal/src/GHC/Internal/IO/Encoding/CodePage/API.hs
    ... ... @@ -2,6 +2,7 @@
    2 2
     {-# LANGUAGE CPP, NoImplicitPrelude, NondecreasingIndentation,
    
    3 3
                  RecordWildCards, ScopedTypeVariables,
    
    4 4
                  UnboxedTuples #-}
    
    5
    +{-# LANGUAGE MagicHash #-}
    
    5 6
     {-# OPTIONS_GHC -Wno-name-shadowing #-}
    
    6 7
     
    
    7 8
     module GHC.Internal.IO.Encoding.CodePage.API (
    
    ... ... @@ -23,6 +24,7 @@ import GHC.Internal.Word
    23 24
     import GHC.Internal.Base (
    
    24 25
         String, const, fmap, otherwise, return, when, ($), (.), (>>),
    
    25 26
       )
    
    27
    +import qualified GHC.Internal.Base as Rebindable ((>>=))
    
    26 28
     import GHC.Internal.Classes (Eq(..), Ord(..), not, (&&), (||))
    
    27 29
     import GHC.Internal.Err (errorWithoutStackTrace, undefined)
    
    28 30
     import GHC.Internal.List
    
    ... ... @@ -32,8 +34,11 @@ import GHC.Internal.IO.Encoding.Types
    32 34
     import GHC.Internal.IO.Encoding.UTF16
    
    33 35
     import GHC.Internal.Num
    
    34 36
     import GHC.Internal.Show
    
    37
    +import qualified GHC.Internal.Stack.Types as Rebindable
    
    38
    +  ( SrcLoc(..), pushCallStack, emptyCallStack )
    
    35 39
     import GHC.Internal.Real
    
    36 40
     import GHC.Internal.Types (Bool(..), Char, Int, IO(..), Ordering(..))
    
    41
    +import qualified GHC.Internal.Types as Rebindable
    
    37 42
     import GHC.Internal.Windows hiding (LPCSTR)
    
    38 43
     import GHC.Internal.ForeignPtr (castForeignPtr)
    
    39 44
     
    

  • libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/Windows.hsc
    ... ... @@ -16,6 +16,7 @@ import GHC.Internal.Base as Rebindable
    16 16
     
    
    17 17
     #include <windows.h>
    
    18 18
     
    
    19
    +import GHC.Internal.Base as Rebindable
    
    19 20
     import GHC.Internal.Data.Bits
    
    20 21
     import GHC.Internal.Data.Function
    
    21 22
     import GHC.Internal.IO.Handle.Windows (handleToHANDLE)
    
    ... ... @@ -30,6 +31,7 @@ import GHC.Internal.IO.Handle.FD
    30 31
     import GHC.Internal.IO.Handle.Types (Handle)
    
    31 32
     import GHC.Internal.IO.Handle.Lock.Common (LockMode(..))
    
    32 33
     import GHC.Internal.IO.SubSystem
    
    34
    +import qualified GHC.Internal.Num as Rebindable
    
    33 35
     import GHC.Internal.Windows
    
    34 36
     
    
    35 37
     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
    25 25
     import GHC.Internal.Data.Typeable
    
    26 26
     
    
    27 27
     import GHC.Internal.Base (String, fmap, otherwise, return, ($))
    
    28
    +import qualified GHC.Internal.Base as Rebindable
    
    29
    +import qualified GHC.Internal.Data.Typeable.Internal as Rebindable
    
    28 30
     import GHC.Internal.MVar
    
    29 31
     import GHC.Internal.IO
    
    30 32
     import GHC.Internal.IO.BufferedIO hiding (flushWriteBuffer)
    
    ... ... @@ -35,6 +37,8 @@ import GHC.Internal.IO.IOMode
    35 37
     import GHC.Internal.IO.Handle.Types
    
    36 38
     import GHC.Internal.IO.Handle.Internals
    
    37 39
     import qualified GHC.Internal.IO.Windows.Handle as Win
    
    40
    +import qualified GHC.Internal.Stack.Types as Rebindable
    
    41
    +  ( SrcLoc(..), pushCallStack, emptyCallStack )
    
    38 42
     import GHC.Internal.Types (Bool(..))
    
    39 43
     
    
    40 44
     -- ---------------------------------------------------------------------------
    

  • libraries/ghc-internal/src/GHC/Internal/IO/Windows/Encoding.hs
    ... ... @@ -25,8 +25,11 @@ module GHC.Internal.IO.Windows.Encoding
    25 25
       ) where
    
    26 26
     
    
    27 27
     import GHC.Internal.Base (String, assert, return, ($), (.))
    
    28
    +import qualified GHC.Internal.Base as Rebindable ((>>=))
    
    28 29
     import GHC.Internal.Classes (Eq(..), Ord(..))
    
    30
    +import qualified GHC.Internal.Num as Rebindable (fromInteger)
    
    29 31
     import GHC.Internal.Types (Int)
    
    32
    +import qualified GHC.Internal.Types as Rebindable
    
    30 33
     import GHC.Internal.Word (Word8, Word16)
    
    31 34
     import GHC.Internal.Foreign.C.Types        (CInt(..))
    
    32 35
     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 (
    63 63
         const, flip, fmap, liftM2, otherwise, return, when,
    
    64 64
         ($), ($!), (.), (=<<), (>>),
    
    65 65
       )
    
    66
    +import qualified GHC.Internal.Base as Rebindable
    
    66 67
     import GHC.Internal.Classes (Eq(..), Ord(..), not, (&&), (||))
    
    67 68
     import GHC.Internal.Data.Maybe (Maybe(..))
    
    68 69
     import GHC.Internal.Enum
    
    69 70
     import GHC.Internal.Err (error, undefined)
    
    70 71
     import GHC.Internal.Num
    
    71 72
     import GHC.Internal.Real
    
    73
    +import qualified GHC.Internal.Show as Rebindable
    
    74
    +import qualified GHC.Internal.Stack.Types as Rebindable
    
    75
    +  ( SrcLoc(..), pushCallStack, emptyCallStack )
    
    72 76
     import GHC.Internal.List
    
    73 77
     import GHC.Internal.Types (Bool(..), Int)
    
    78
    +import qualified GHC.Internal.Types as Rebindable
    
    79
    +import qualified GHC.Internal.Data.Typeable.Internal as Rebindable
    
    74 80
     import GHC.Internal.Word (Word8, Word16, Word64)
    
    75 81
     
    
    76 82
     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
    47 47
     import GHC.Internal.Base (String, otherwise, ($))
    
    48 48
     #if defined(mingw32_HOST_OS)
    
    49 49
     import GHC.Internal.Base ((.))
    
    50
    +import qualified GHC.Internal.Num as Rebindable
    
    50 51
     import GHC.Internal.Foreign.Ptr
    
    51 52
     import GHC.Internal.Windows
    
    52 53
     import GHC.Internal.Control.Monad
    

  • libraries/ghc-internal/src/GHC/Internal/Windows.hs
    ... ... @@ -78,10 +78,8 @@ module GHC.Internal.Windows (
    78 78
             nullHANDLE,
    
    79 79
         ) where
    
    80 80
     
    
    81
    -import GHC.Internal.Classes (Eq(..), not)
    
    82 81
     import GHC.Internal.Data.Bits (finiteBitSize, shiftL, shiftR, (.|.), (.&.))
    
    83 82
     import GHC.Internal.Err (undefined)
    
    84
    -import GHC.Internal.Types (Bool(..))
    
    85 83
     import GHC.Internal.Unicode (isSpace)
    
    86 84
     import GHC.Internal.Data.OldList
    
    87 85
     import GHC.Internal.Data.Maybe
    
    ... ... @@ -96,6 +94,7 @@ import GHC.Internal.Enum (maxBound)
    96 94
     import GHC.Internal.IO
    
    97 95
     import GHC.Internal.Num
    
    98 96
     import GHC.Internal.Real (fromIntegral)
    
    97
    +import qualified GHC.Internal.Stack.Types as Rebindable (SrcLoc(..), pushCallStack, emptyCallStack)
    
    99 98
     import GHC.Internal.System.IO.Error
    
    100 99
     
    
    101 100
     import qualified GHC.Internal.Numeric