Rodrigo Mesquita pushed to branch wip/spj-reinstallable-base2 at Glasgow Haskell Compiler / GHC
Commits:
-
9a1fb983
by Rodrigo Mesquita at 2026-05-13T15:45:40+01:00
-
baf37fe7
by Rodrigo Mesquita at 2026-05-13T17:25:45+01:00
14 changed files:
- libraries/base/src/GHC/Essentials.hs
- libraries/ghc-internal/src/GHC/Internal/Bits.hs
- libraries/ghc-internal/src/GHC/Internal/Char.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fail.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Maybe.hs
- libraries/ghc-internal/src/GHC/Internal/Float.hs
- libraries/ghc-internal/src/GHC/Internal/IO.hs-boot
- libraries/ghc-internal/src/GHC/Internal/List.hs
- libraries/ghc-internal/src/GHC/Internal/Records.hs
- libraries/ghc-internal/src/GHC/Internal/Stack.hs-boot
- libraries/ghc-internal/src/GHC/Internal/Stack/Constants.hsc
- libraries/ghc-internal/src/GHC/Internal/Stack/ConstantsProf.hsc
- libraries/ghc-internal/src/GHC/Internal/Text/ParserCombinators/ReadPrec.hs
- libraries/ghc-internal/src/GHC/Internal/Unsafe/Coerce.hs
Changes:
| ... | ... | @@ -24,7 +24,8 @@ module GHC.Essentials |
| 24 | 24 | |
| 25 | 25 | -- Misc
|
| 26 | 26 | , (.), (&&), not, foldrList, build, map
|
| 27 | - , seq#
|
|
| 27 | + , seq#, ($), assert, considerAccessible
|
|
| 28 | + , augment, otherwise,
|
|
| 28 | 29 | |
| 29 | 30 | -- Applicative
|
| 30 | 31 | , Applicative, pure, mzip, (<*>), (*>), liftA2
|
| ... | ... | @@ -73,6 +73,7 @@ import GHC.Internal.Prim ( |
| 73 | 73 | (-#), (==#), (>=#)
|
| 74 | 74 | )
|
| 75 | 75 | import GHC.Internal.Real
|
| 76 | +import GHC.Internal.Stack.Types
|
|
| 76 | 77 | |
| 77 | 78 | infixl 8 `shift`, `rotate`, `shiftL`, `shiftR`, `rotateL`, `rotateR`
|
| 78 | 79 | infixl 7 .&.
|
| ... | ... | @@ -11,6 +11,7 @@ module GHC.Internal.Char |
| 11 | 11 | ) where
|
| 12 | 12 | |
| 13 | 13 | import GHC.Internal.Base
|
| 14 | +import GHC.Internal.Stack.Types
|
|
| 14 | 15 | import GHC.Internal.Err (error)
|
| 15 | 16 | import GHC.Internal.Show
|
| 16 | 17 | import GHC.Internal.Prim (chr#, int2Word#, leWord#, Int#, Char#)
|
| ... | ... | @@ -21,7 +21,7 @@ import GHC.Internal.Base |
| 21 | 21 | import {-# SOURCE #-} GHC.Internal.IO (throwIO)
|
| 22 | 22 | import {-# SOURCE #-} GHC.Internal.IO.Exception (userError)
|
| 23 | 23 | import GHC.Internal.Maybe (Maybe(..))
|
| 24 | -import GHC.Internal.Stack.Types (HasCallStack)
|
|
| 24 | +import GHC.Internal.Stack.Types
|
|
| 25 | 25 | |
| 26 | 26 | -- | When a value is bound in @do@-notation, the pattern on the left
|
| 27 | 27 | -- hand side of @<-@ might not match. In this case, this class
|
| ... | ... | @@ -34,7 +34,7 @@ module GHC.Internal.Data.Maybe |
| 34 | 34 | import GHC.Internal.Base
|
| 35 | 35 | import GHC.Internal.Err (error)
|
| 36 | 36 | import GHC.Internal.Maybe (Maybe(..))
|
| 37 | -import GHC.Internal.Stack.Types (HasCallStack)
|
|
| 37 | +import GHC.Internal.Stack.Types
|
|
| 38 | 38 | |
| 39 | 39 | -- $setup
|
| 40 | 40 | -- Allow the use of some Prelude functions in doctests.
|
| ... | ... | @@ -203,6 +203,7 @@ import GHC.Internal.Arr |
| 203 | 203 | import GHC.Internal.Float.RealFracMethods
|
| 204 | 204 | import GHC.Internal.Float.ConversionUtils
|
| 205 | 205 | import GHC.Internal.Bignum.BigNat
|
| 206 | +import GHC.Internal.Stack.Types as Rebindable
|
|
| 206 | 207 | |
| 207 | 208 | #if WORD_SIZE_IN_BITS == 64
|
| 208 | 209 | import GHC.Internal.Prim (
|
| 1 | 1 | {-# LANGUAGE Unsafe #-}
|
| 2 | 2 | {-# LANGUAGE NoImplicitPrelude #-}
|
| 3 | 3 | |
| 4 | +{-# OPTIONS_GHC -fdefines-known-key-names #-}
|
|
| 4 | 5 | module GHC.Internal.IO where
|
| 5 | 6 | |
| 6 | -import GHC.Internal.Stack.Types (HasCallStack)
|
|
| 7 | +import GHC.Internal.Stack.Types
|
|
| 7 | 8 | import GHC.Internal.Types
|
| 8 | 9 | import {-# SOURCE #-} GHC.Internal.Exception.Type (Exception, SomeException)
|
| 9 | 10 |
| ... | ... | @@ -49,7 +49,7 @@ import GHC.Internal.Err (error) |
| 49 | 49 | import GHC.Internal.Num (Num(..))
|
| 50 | 50 | import GHC.Internal.Bignum.Integer (Integer)
|
| 51 | 51 | import GHC.Internal.Prim (seq)
|
| 52 | -import GHC.Internal.Stack.Types (HasCallStack)
|
|
| 52 | +import GHC.Internal.Stack.Types
|
|
| 53 | 53 | |
| 54 | 54 | infixl 9 !?, !!
|
| 55 | 55 | infix 4 `elem`, `notElem`
|
| ... | ... | @@ -32,6 +32,7 @@ module GHC.Internal.Records |
| 32 | 32 | |
| 33 | 33 | import GHC.Internal.Base
|
| 34 | 34 | import GHC.Internal.Err( error )
|
| 35 | +import GHC.Internal.Stack.Types
|
|
| 35 | 36 | |
| 36 | 37 | -- | Constraint representing the fact that the field @x@ belongs to
|
| 37 | 38 | -- the record type @r@ and has field type @a@. This will be solved
|
| 1 | -{-# LANGUAGE NoImplicitPrelude, RankNTypes #-}
|
|
| 1 | +{-# LANGUAGE NoImplicitPrelude, RankNTypes, MagicHash #-}
|
|
| 2 | 2 | |
| 3 | 3 | module GHC.Internal.Stack where
|
| 4 | 4 | |
| 5 | -import GHC.Internal.Base (String)
|
|
| 6 | -import GHC.Internal.Stack.Types (HasCallStack, CallStack, SrcLoc)
|
|
| 5 | +import GHC.Internal.Base
|
|
| 6 | +import GHC.Internal.Stack.Types
|
|
| 7 | 7 | |
| 8 | 8 | prettyCallStackLines :: CallStack -> [String]
|
| 9 | 9 | prettyCallStack :: CallStack -> String
|
| ... | ... | @@ -9,6 +9,7 @@ import GHC.Internal.Err (error) |
| 9 | 9 | import GHC.Internal.Num
|
| 10 | 10 | import GHC.Internal.Show
|
| 11 | 11 | import GHC.Internal.Real
|
| 12 | +import GHC.Internal.Stack.Types
|
|
| 12 | 13 | |
| 13 | 14 | #include "Rts.h"
|
| 14 | 15 | #undef BLOCK_SIZE
|
| ... | ... | @@ -8,6 +8,7 @@ import GHC.Internal.Enum |
| 8 | 8 | import GHC.Internal.Err (error)
|
| 9 | 9 | import GHC.Internal.Num
|
| 10 | 10 | import GHC.Internal.Show
|
| 11 | +import GHC.Internal.Stack.Types
|
|
| 11 | 12 | import GHC.Internal.Real
|
| 12 | 13 | |
| 13 | 14 | -- This file is a copy of GHC.Internal.Stack.Constants, but compiled with PROFILING
|
| ... | ... | @@ -64,6 +64,7 @@ import qualified GHC.Internal.Text.ParserCombinators.ReadP as ReadP |
| 64 | 64 | import GHC.Internal.Base
|
| 65 | 65 | import GHC.Internal.Num( Num(..) )
|
| 66 | 66 | import GHC.Internal.Control.Monad.Fail
|
| 67 | +import GHC.Internal.Stack.Types as Rebindable
|
|
| 67 | 68 | |
| 68 | 69 | -- ---------------------------------------------------------------------------
|
| 69 | 70 | -- The readPrec type
|
| ... | ... | @@ -25,6 +25,7 @@ module GHC.Internal.Unsafe.Coerce |
| 25 | 25 | import GHC.Internal.Base
|
| 26 | 26 | import GHC.Internal.Arr (amap) -- For amap/unsafeCoerce rule
|
| 27 | 27 | import GHC.Internal.Err (error)
|
| 28 | +import GHC.Internal.Stack.Types as Rebindable
|
|
| 28 | 29 | |
| 29 | 30 | {- Note [Implementing unsafeCoerce]
|
| 30 | 31 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|