Simon Peyton Jones pushed to branch wip/spj-reinstallable-base at Glasgow Haskell Compiler / GHC
Commits:
-
545fa306
by Simon Peyton Jones at 2026-03-30T17:49:23+01:00
6 changed files:
- compiler/GHC/Builtin/Names.hs
- libraries/base/src/Data/List.hs
- libraries/base/src/GHC/KnownKeyNames.hs
- libraries/base/src/GHC/Stats.hs
- libraries/base/src/System/Exit.hs
- libraries/base/src/System/IO/OS.hs
Changes:
| ... | ... | @@ -263,7 +263,8 @@ basicKnownKeyTable |
| 263 | 263 | , (mkTcOcc "HasField", hasFieldClassKey)
|
| 264 | 264 | , (mkVarOcc "fromLabel", fromLabelClassOpKey)
|
| 265 | 265 | , (mkVarOcc "getField", getFieldClassOpKey)
|
| 266 | - , (mkVarOcc "setField", setFieldClassOpKey)
|
|
| 266 | + -- setField is not yet defined in ghc-internal
|
|
| 267 | + -- , (mkVarOcc "setField", setFieldClassOpKey)
|
|
| 267 | 268 | |
| 268 | 269 | -- FromList
|
| 269 | 270 | , (mkVarOcc "fromList", fromListClassOpKey)
|
| ... | ... | @@ -193,7 +193,7 @@ import GHC.Internal.Int (Int) |
| 193 | 193 | import GHC.Internal.Num ((-))
|
| 194 | 194 | import GHC.List (build)
|
| 195 | 195 | import qualified Data.List.NubOrdSet as NubOrdSet
|
| 196 | -import GHC.Internal.Num( Num ) -- For -frebindable-known-key-names (defaulting)
|
|
| 196 | +import GHC.Internal.Num( Num, fromInteger ) -- For -frebindable-known-key-names (defaulting)
|
|
| 197 | 197 | |
| 198 | 198 | inits1, tails1 :: [a] -> [NonEmpty a]
|
| 199 | 199 |
| 1 | +{-# LANGUAGE Trustworthy #-}
|
|
| 2 | + |
|
| 1 | 3 | -- |
|
| 2 | 4 | --
|
| 3 | 5 | -- Module : GHC.KnownKeyNames
|
| ... | ... | @@ -12,18 +14,28 @@ module GHC.KnownKeyNames |
| 12 | 14 | ( Rational
|
| 13 | 15 | , Eq, (==)
|
| 14 | 16 | , Ord, Show
|
| 15 | - , Num, (-), negate
|
|
| 16 | - , Integral
|
|
| 17 | + , Ix
|
|
| 17 | 18 | , Enum, Bounded
|
| 18 | 19 | , Foldable, Traversable
|
| 19 | - , IsString
|
|
| 20 | + , Data
|
|
| 20 | 21 | , Functor, fmap
|
| 21 | 22 | , Monad, (>>), (>>=), return, fail, guard, mfix, join
|
| 22 | 23 | , Applicative, mzip, (<*>)
|
| 24 | + , Alternative
|
|
| 25 | + , Semigroup, Monoid
|
|
| 23 | 26 | , (<>), mappend
|
| 24 | 27 | |
| 28 | + -- Numbers
|
|
| 29 | + , Num, Integral
|
|
| 30 | + , (-), negate, fromInteger, fromRational
|
|
| 31 | + |
|
| 32 | + -- Strings
|
|
| 33 | + , IsString
|
|
| 34 | + , fromString
|
|
| 35 | + |
|
| 25 | 36 | -- Records and lists
|
| 26 | - , fromlabel, getField, setField
|
|
| 37 | + , HasField
|
|
| 38 | + , fromLabel, getField
|
|
| 27 | 39 | , fromList, fromListN, toList
|
| 28 | 40 | |
| 29 | 41 | -- Arrows
|
| ... | ... | @@ -35,11 +47,15 @@ module GHC.KnownKeyNames |
| 35 | 47 | |
| 36 | 48 | import Prelude
|
| 37 | 49 | import Data.String( IsString )
|
| 38 | -import GHC.Internal.Base( join )
|
|
| 50 | +import GHC.Internal.Base( Alternative, join, thenIO, bindIO, returnIO )
|
|
| 51 | +import GHC.Internal.Ix( Ix )
|
|
| 52 | +import GHC.Internal.Data.Data( Data )
|
|
| 53 | +import GHC.Internal.Data.String( fromString )
|
|
| 54 | +import GHC.Internal.Real( mkRationalBase2, mkRationalBase10 )
|
|
| 39 | 55 | import GHC.Internal.Control.Monad( guard )
|
| 40 | -import GHC.Internal.Control.Monad.Fix( mfix )
|
|
| 56 | +import GHC.Internal.Control.Monad.Fix( mfix, loop )
|
|
| 41 | 57 | import GHC.Internal.Control.Monad.Zip( mzip )
|
| 42 | 58 | import GHC.Internal.Control.Arrow( arr, (>>>), first, app, (|||) )
|
| 43 | 59 | import GHC.Internal.OverloadedLabels( fromLabel )
|
| 44 | -import GHC.Internal.Records( getField, setField )
|
|
| 60 | +import GHC.Internal.Records( HasField, getField )
|
|
| 45 | 61 | import GHC.Internal.IsList( fromList, fromListN, toList ) |
| ... | ... | @@ -43,6 +43,7 @@ import qualified GHC.Internal.Stats as Internal |
| 43 | 43 | import GHC.Generics (Generic)
|
| 44 | 44 | import Data.Word (Word64,Word32)
|
| 45 | 45 | import Data.Int (Int64)
|
| 46 | +import Prelude( (>>=), (>>) ) -- For known-key names
|
|
| 46 | 47 | |
| 47 | 48 | -- | Time values from the RTS, using a fixed resolution of nanoseconds.
|
| 48 | 49 | type RtsTime = Int64
|
| ... | ... | @@ -35,6 +35,7 @@ import Data.String (String) |
| 35 | 35 | import Data.Eq ((/=))
|
| 36 | 36 | import System.IO (IO, hPutStrLn, stderr)
|
| 37 | 37 | import GHC.Internal.Num( Num ) -- For -frebindable-known-key-names (defaulting)
|
| 38 | +import GHC.Internal.Num( fromInteger ) -- For known-key names
|
|
| 38 | 39 | |
| 39 | 40 | -- ---------------------------------------------------------------------------
|
| 40 | 41 | -- exitWith
|
| ... | ... | @@ -23,6 +23,8 @@ module System.IO.OS |
| 23 | 23 | )
|
| 24 | 24 | where
|
| 25 | 25 | |
| 26 | +import GHC.KnownKeyNames
|
|
| 27 | + |
|
| 26 | 28 | import Control.Monad (return)
|
| 27 | 29 | import Control.Concurrent.MVar (MVar)
|
| 28 | 30 | import Control.Exception (mask)
|