summaryrefslogtreecommitdiff
path: root/libraries/ghc-prim/changelog.md
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ghc-prim/changelog.md')
-rw-r--r--libraries/ghc-prim/changelog.md43
1 files changed, 22 insertions, 21 deletions
diff --git a/libraries/ghc-prim/changelog.md b/libraries/ghc-prim/changelog.md
index 049b254743..6f665f3fcb 100644
--- a/libraries/ghc-prim/changelog.md
+++ b/libraries/ghc-prim/changelog.md
@@ -1,24 +1,25 @@
-## next (edit as necessary)
+## 0.9.0
+
+- Shipped with GHC 9.4.1
- `magicDict` has been renamed to `withDict` and is now defined in
`GHC.Magic.Dict` instead of `GHC.Prim`. `withDict` now has the type:
- ```
- class WithDict cls meth where
- withDict :: forall {rr :: RuntimeRep} (r :: TYPE rr). meth -> (cls => r) -> r
+ ```haskell
+ withDict :: forall {rr :: RuntimeRep} st dt (r :: TYPE rr). st -> (dt => r) -> r
```
Unlike `magicDict`, `withDict` can be used without defining an
intermediate data type. For example, the `withTypeable` function from the
`Data.Typeable` module can now be defined as:
- ```
+ ```haskell
withTypeable :: forall k (a :: k) rep (r :: TYPE rep). ()
=> TypeRep a -> (Typeable a => r) -> r
- withTypeable rep k = withDict @(Typeable a) rep k
+ withTypeable rep k = withDict @(TypeRep a) @(Typeable a) rep k
```
- Note that the explicit type application is required, as the call to
+ Note that the explicit type applications are required, as the call to
`withDict` would be ambiguous otherwise.
- Primitive types and functions which handle boxed values are now levity-polymorphic,
@@ -34,25 +35,25 @@
For example, `Array#` used to have kind:
- ```
+ ```haskell
Type -> UnliftedType
```
but it now has kind:
- ```
+ ```haskell
forall {l :: Levity}. TYPE (BoxedRep l) -> UnliftedType
```
Similarly, `MutVar#` used to have kind:
- ```
+ ```haskell
Type -> Type -> UnliftedType
```
but it now has kind:
- ```
+ ```haskell
forall {l :: Levity}. Type -> TYPE (BoxedRep l) -> UnliftedType
```
@@ -95,7 +96,7 @@
For example, the full type of `newMutVar#` is now:
- ```
+ ```haskell
newMutVar#
:: forall {l :: Levity} s (a :: TYPE (BoxedRep l)).
a -> State# s -> (# State# s, MVar# s a #)
@@ -103,7 +104,7 @@
and the full type of `writeSmallArray#` is:
- ```
+ ```haskell
writeSmallArray#
:: forall {l :: Levity} s (a :: TYPE ('BoxedRep l)).
SmallMutableArray# s a -> Int# -> a -> State# s -> State# s
@@ -116,7 +117,7 @@
- `mkWeak#`, `mkWeakNoFinalizer#`, `touch#` and `keepAlive#` are now
levity-polymorphic instead of representation-polymorphic. For instance:
- ```
+ ```haskell
mkWeakNoFinalizer#
:: forall {l :: Levity} {k :: Levity}
(a :: TYPE ('BoxedRep l))
@@ -133,7 +134,7 @@
- Primitive functions for throwing and catching exceptions are now more polymorphic
than before. For example, `catch#` now has type:
- ```
+ ```haskell
catch#
:: forall {r :: RuntimeRep} {l :: Levity}
(a :: TYPE r)
@@ -154,7 +155,7 @@
Note in particular that `raise#` is now both representation-polymorphic
(with an inferred `RuntimeRep` argument) and levity-polymorphic, with type:
- ```
+ ```haskell
raise# :: forall {l :: Levity} {r :: RuntimeRep}
(a :: TYPE (BoxedRep l))
(b :: TYPE r).
@@ -171,7 +172,7 @@
- `reallyUnsafePtrEquality#` has been made more general, as it is now
both levity-polymorphic and heterogeneous:
- ```
+ ```haskell
reallyUnsafePtrEquality#
:: forall {l :: Levity} {k :: Levity}
(a :: TYPE (BoxedRep l))
@@ -192,14 +193,14 @@
- The following functions have been added to `GHC.Exts`:
- ```
+ ```haskell
sameArray# :: Array# a -> Array# a -> Int#
sameSmallArray# :: SmallArray# a -> SmallArray# a -> Int#
sameByteArray# :: ByteArray# -> ByteArray# -> Int#
sameArrayArray# :: ArrayArray# -> ArrayArray# -> Int#
```
-## 0.8.0 (edit as necessary)
+## 0.8.0
- Change array access primops to use type with size maxing the element size:
@@ -228,7 +229,7 @@
atomicCasWord32Addr# :: Addr# -> Word32# -> Word32# -> State# s -> (# State# s, Word32# #)
atomicCasWord64Addr# :: Addr# -> WORD64 -> WORD64 -> State# s -> (# State# s, WORD64 #)
-## 0.7.0 (edit as necessary)
+## 0.7.0
- Shipped with GHC 9.0.1
@@ -267,7 +268,7 @@
the soundness issues of the latter (see
[#17760](https://gitlab.haskell.org/ghc/ghc/-/issues/17760)).
-## 0.6.1 (edit as necessary)
+## 0.6.1
- Shipped with GHC 8.10.1