diff options
author | sheaf <sam.derbyshire@gmail.com> | 2021-12-03 12:50:35 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-12-07 13:32:55 -0500 |
commit | 427f9c122f5b1f130b0a342047c87ee0420050c9 (patch) | |
tree | 074c2d1449fa7d2706a875840818371ef6a62b52 /libraries/base | |
parent | 7eb5606441bf11ba2ebd5f8904918dc82a2a3126 (diff) | |
download | haskell-427f9c122f5b1f130b0a342047c87ee0420050c9.tar.gz |
Re-export GHC.Types from GHC.Exts
Several times in the past, it has happened that things from GHC.Types
were not re-exported from GHC.Exts, forcing users to import either
GHC.Types or GHC.Prim, which are subject to internal change without
notice.
We now re-export GHC.Types from GHC.Exts, which should avoid this
happening again in the future.
In particular, we now re-export `Multiplicity` and `MultMul`,
which we didn't before.
Fixes #20695
Diffstat (limited to 'libraries/base')
-rwxr-xr-x | libraries/base/GHC/Exts.hs | 105 | ||||
-rw-r--r-- | libraries/base/changelog.md | 2 |
2 files changed, 54 insertions, 53 deletions
diff --git a/libraries/base/GHC/Exts.hs b/libraries/base/GHC/Exts.hs index b9d632095c..c03b397601 100755 --- a/libraries/base/GHC/Exts.hs +++ b/libraries/base/GHC/Exts.hs @@ -24,23 +24,28 @@ module GHC.Exts ( - -- * Representations of some basic types - Int(..),Word(..),Float(..),Double(..), - Char(..), + -- * Primitive types + + FUN, TYPE, -- See https://gitlab.haskell.org/ghc/ghc/issues/18302 + + -- ** Pointer types Ptr(..), FunPtr(..), - -- * The maximum tuple size - maxTupleSize, + -- ** Other primitive types + module GHC.Types, -- * Primitive operations - FUN, -- See https://gitlab.haskell.org/ghc/ghc/issues/18302 + module GHC.Prim, module GHC.Prim.Ext, + + -- ** Running 'RealWorld' state thread + runRW#, + + -- ** Bit shift operations shiftL#, shiftRL#, iShiftL#, iShiftRA#, iShiftRL#, - isTrue#, - Void#, -- Previously exported by GHC.Prim - -- * Pointer comparison operations + -- ** Pointer comparison operations -- See `Note [Pointer comparison operations]` in primops.txt.pp reallyUnsafePtrEquality, eqStableName#, @@ -57,10 +62,10 @@ module GHC.Exts sameTVar#, sameIOPort#, - -- * Compat wrapper + -- ** Compat wrapper atomicModifyMutVar#, - -- * Resize functions + -- ** Resize functions -- -- | Resizing arrays of boxed elements is currently handled in -- library space (rather than being a primop) since there is not @@ -68,13 +73,20 @@ module GHC.Exts -- may become primops in a future release of GHC. resizeSmallMutableArray#, - -- * Fusion + -- ** Fusion build, augment, - -- * Overloaded string literals + -- * Overloaded lists + IsList(..), + + -- * Transform comprehensions + Down(..), groupWith, sortWith, the, + + -- * Strings + -- ** Overloaded string literals IsString(..), - -- * CString + -- ** CString unpackCString#, unpackAppendCString#, unpackFoldrCString#, @@ -83,59 +95,46 @@ module GHC.Exts cstringLength#, -- * Debugging + -- ** Breakpoints breakpoint, breakpointCond, - -- * Ids with special behaviour - inline, noinline, lazy, oneShot, considerAccessible, SPEC (..), + -- ** Event logging + traceEvent, - -- * Running 'RealWorld' state thread - runRW#, + -- ** The call stack + currentCallStack, - -- * Casting class dictionaries with single methods - withDict, + -- * Ids with special behaviour + inline, noinline, lazy, oneShot, considerAccessible, - -- * Safe coercions + -- * SpecConstr annotations + SpecConstrAnnotation(..), SPEC (..), + + -- * Coercions + -- ** Safe coercions -- - -- | These are available from the /Trustworthy/ module "Data.Coerce" as well + -- | These are available from the /Trustworthy/ module "Data.Coerce" as well. -- -- @since 4.7.0.0 - Data.Coerce.coerce, Data.Coerce.Coercible, + Data.Coerce.coerce, - -- * Very unsafe coercion + -- ** Very unsafe coercion unsafeCoerce#, - -- * Equality - type (~~), - - -- * Representation polymorphism - GHC.Prim.TYPE, RuntimeRep(..), Levity(..), - LiftedRep, UnliftedRep, UnliftedType, - VecCount(..), VecElem(..), - - -- * Transform comprehensions - Down(..), groupWith, sortWith, the, - - -- * Event logging - traceEvent, - - -- * SpecConstr annotations - SpecConstrAnnotation(..), - - -- * The call stack - currentCallStack, - - -- * The Constraint kind - Constraint, - - -- * The Any type - Any, + -- ** Casting class dictionaries with single methods + withDict, - -- * Overloaded lists - IsList(..) + -- * The maximum tuple size + maxTupleSize, ) where -import GHC.Prim hiding ( coerce, TYPE ) -import qualified GHC.Prim +import GHC.Prim hiding ( coerce ) +import GHC.Types + hiding ( IO -- Exported from "GHC.IO" + , Type -- Exported from "Data.Kind" + + -- GHC's internal representation of 'TyCon's, for 'Typeable' + , Module, TrName, TyCon, TypeLitSort, KindRep, KindBndr ) import qualified GHC.Prim.Ext import GHC.Base hiding ( coerce ) import GHC.Ptr diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md index 7ddc112af4..52f6a56d0c 100644 --- a/libraries/base/changelog.md +++ b/libraries/base/changelog.md @@ -27,6 +27,8 @@ These new operators have the same fixity as the originals. + * `GHC.Exts` now re-exports `Multiplicity` and `MultMul`. + ## 4.16.0.0 *Nov 2021* * The unary tuple type, `Solo`, is now exported by `Data.Tuple`. |