summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Type.hs-boot
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/Core/Type.hs-boot
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/Core/Type.hs-boot')
-rw-r--r--compiler/GHC/Core/Type.hs-boot2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Core/Type.hs-boot b/compiler/GHC/Core/Type.hs-boot
index 94f9e34f83..f5b9c6f20d 100644
--- a/compiler/GHC/Core/Type.hs-boot
+++ b/compiler/GHC/Core/Type.hs-boot
@@ -27,4 +27,6 @@ mkTYPEapp :: Type -> Type
splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
tyConAppTyCon_maybe :: Type -> Maybe TyCon
+getLevity :: HasDebugCallStack => Type -> Type
+
partitionInvisibleTypes :: TyCon -> [Type] -> ([Type], [Type])