Only short-circuit pointer equality for correct types

This commit is contained in:
Ken Micklas 2019-03-09 20:40:12 -05:00
parent 05fccda825
commit 8ddbe165e6

View file

@ -232,7 +232,9 @@ thunkEq lt rt = force lt $ \lv -> force rt $ \rv ->
(NVSet _ _, NVSet _ _) -> pure unsafePtrEq
_ -> valueEq lv rv
where
unsafePtrEq = True -- TODO
unsafePtrEq = case (lt, rt) of
(NThunk _ (Thunk lid _ _), NThunk _ (Thunk rid _ _)) -> lid == rid
_ -> False
-- | Checks whether two containers are equal, using the given item equality
-- predicate. If there are any item slots that don't match between the two