Skip to content

Commit d66f3b3

Browse files
authored
Remove hetPtrEq (#1000)
This is unusued today, and triggers an hpc bug by merely existing.
1 parent edc0e14 commit d66f3b3

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

containers/src/Utils/Containers/Internal/PtrEquality.hs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,24 @@
66
{-# OPTIONS_HADDOCK hide #-}
77

88
-- | Really unsafe pointer equality
9-
module Utils.Containers.Internal.PtrEquality (ptrEq, hetPtrEq) where
9+
module Utils.Containers.Internal.PtrEquality (ptrEq) where
1010

1111
#ifdef __GLASGOW_HASKELL__
12-
import GHC.Exts ( reallyUnsafePtrEquality# )
13-
import Unsafe.Coerce ( unsafeCoerce )
14-
import GHC.Exts ( Int#, isTrue# )
12+
import GHC.Exts ( isTrue#, reallyUnsafePtrEquality# )
1513
#endif
1614

1715
-- | Checks if two pointers are equal. Yes means yes;
1816
-- no means maybe. The values should be forced to at least
1917
-- WHNF before comparison to get moderately reliable results.
2018
ptrEq :: a -> a -> Bool
2119

22-
-- | Checks if two pointers are equal, without requiring
23-
-- them to have the same type. The values should be forced
24-
-- to at least WHNF before comparison to get moderately
25-
-- reliable results.
26-
hetPtrEq :: a -> b -> Bool
27-
2820
#ifdef __GLASGOW_HASKELL__
2921
ptrEq x y = isTrue# (reallyUnsafePtrEquality# x y)
30-
hetPtrEq x y = isTrue# (unsafeCoerce (reallyUnsafePtrEquality# :: x -> x -> Int#) x y)
31-
3222
#else
3323
-- Not GHC
3424
ptrEq _ _ = False
35-
hetPtrEq _ _ = False
3625
#endif
3726

3827
{-# INLINE ptrEq #-}
39-
{-# INLINE hetPtrEq #-}
4028

4129
infix 4 `ptrEq`
42-
infix 4 `hetPtrEq`

0 commit comments

Comments
 (0)