summaryrefslogtreecommitdiff
path: root/compiler/GHC/Builtin/Names.hs
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2022-01-17 10:48:11 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-01-26 12:01:45 -0500
commite471a6803842db93483526f2be58b61ea3c33dc7 (patch)
treee07383ab88832f5ae806e4b04a8a734061b60dde /compiler/GHC/Builtin/Names.hs
parent781323a3076781b5db50bdbeb8f64394add43836 (diff)
downloadhaskell-e471a6803842db93483526f2be58b61ea3c33dc7.tar.gz
Levity-polymorphic arrays and mutable variables
This patch makes the following types levity-polymorphic in their last argument: - Array# a, SmallArray# a, Weak# b, StablePtr# a, StableName# a - MutableArray# s a, SmallMutableArray# s a, MutVar# s a, TVar# s a, MVar# s a, IOPort# s a The corresponding primops are also made levity-polymorphic, e.g. `newArray#`, `readArray#`, `writeMutVar#`, `writeIOPort#`, etc. Additionally, exception handling functions such as `catch#`, `raise#`, `maskAsyncExceptions#`,... are made levity/representation-polymorphic. Now that Array# and MutableArray# also work with unlifted types, we can simply re-define ArrayArray# and MutableArrayArray# in terms of them. This means that ArrayArray# and MutableArrayArray# are no longer primitive types, but simply unlifted newtypes around Array# and MutableArrayArray#. This completes the implementation of the Pointer Rep proposal https://github.com/ghc-proposals/ghc-proposals/pull/203 Fixes #20911 ------------------------- Metric Increase: T12545 ------------------------- ------------------------- Metric Decrease: T12545 -------------------------
Diffstat (limited to 'compiler/GHC/Builtin/Names.hs')
-rw-r--r--compiler/GHC/Builtin/Names.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/GHC/Builtin/Names.hs b/compiler/GHC/Builtin/Names.hs
index 89dbfa5f30..c0ebb2929b 100644
--- a/compiler/GHC/Builtin/Names.hs
+++ b/compiler/GHC/Builtin/Names.hs
@@ -1770,7 +1770,7 @@ hasFieldClassNameKey = mkPreludeClassUnique 50
************************************************************************
-}
-addrPrimTyConKey, arrayPrimTyConKey, arrayArrayPrimTyConKey, boolTyConKey,
+addrPrimTyConKey, arrayPrimTyConKey, boolTyConKey,
byteArrayPrimTyConKey, charPrimTyConKey, charTyConKey, doublePrimTyConKey,
doubleTyConKey, floatPrimTyConKey, floatTyConKey, funTyConKey,
intPrimTyConKey, intTyConKey, int8TyConKey, int16TyConKey,
@@ -1778,7 +1778,7 @@ addrPrimTyConKey, arrayPrimTyConKey, arrayArrayPrimTyConKey, boolTyConKey,
int64PrimTyConKey, int64TyConKey,
integerTyConKey, naturalTyConKey,
listTyConKey, foreignObjPrimTyConKey, maybeTyConKey,
- weakPrimTyConKey, mutableArrayPrimTyConKey, mutableArrayArrayPrimTyConKey,
+ weakPrimTyConKey, mutableArrayPrimTyConKey,
mutableByteArrayPrimTyConKey, orderingTyConKey, mVarPrimTyConKey,
ratioTyConKey, rationalTyConKey, realWorldTyConKey, stablePtrPrimTyConKey,
stablePtrTyConKey, eqTyConKey, heqTyConKey, ioPortPrimTyConKey,
@@ -1825,8 +1825,6 @@ stablePtrPrimTyConKey = mkPreludeTyConUnique 38
stablePtrTyConKey = mkPreludeTyConUnique 39
eqTyConKey = mkPreludeTyConUnique 40
heqTyConKey = mkPreludeTyConUnique 41
-arrayArrayPrimTyConKey = mkPreludeTyConUnique 42
-mutableArrayArrayPrimTyConKey = mkPreludeTyConUnique 43
statePrimTyConKey, stableNamePrimTyConKey, stableNameTyConKey,
mutVarPrimTyConKey, ioTyConKey,