... | ... | @@ -378,14 +378,14 @@ reallyUnsafePtrEquality# |
|
|
. a -> b -> Int#
|
|
|
```
|
|
|
|
|
|
This means that it is no longer necessary to use `unsafeCoerce#` when using `reallyUnsafePtrEquality#` on values of different types, or whose types are unlifted, such as `Array#`, `ByteArray#`, `SmallArray#`. In fact, it is no longer possible to use `unsafeCoerce#` in this way, as GHC doesn't support unsaturated levity-polymorphic primops. This means that code such as
|
|
|
This means that it is no longer necessary to use `unsafeCoerce#` when using `reallyUnsafePtrEquality#` on values of different types, or whose types are unlifted, such as `Array#`, `ByteArray#`, `SmallArray#`. This means that programs such as
|
|
|
|
|
|
```haskell
|
|
|
hetPtrEq :: a -> b -> Bool
|
|
|
hetPtrEq a b = isTrue# (unsafeCoerce# reallyUnsafePtrEquality# a b)
|
|
|
```
|
|
|
|
|
|
will no longer typecheck. To fix this, simply remove the call to `unsafeCoerce#`:
|
|
|
no longer need to use `unsafeCoerce#`, and can be rewritten to:
|
|
|
|
|
|
```haskell
|
|
|
hetPtrEq :: a -> b -> Bool
|
... | ... | |