Really get rid of magic...

This commit is contained in:
Pierre Chambart 2018-04-24 14:46:44 +02:00 committed by Grégoire Henry
parent 7de7043a74
commit 6bdb959204

View File

@ -248,9 +248,8 @@ end = struct
let empty = Empty
(* Is there a better way to do ? *)
let equal (x:'a t) (y:'b t) =
(Obj.magic x) == (Obj.magic y)
let equal (x:not_empty t) (y:not_empty t) =
x == y
let fast_partial_equal = equal
@ -330,8 +329,8 @@ end = struct
| _, _ ->
false
let fast_partial_equal (x:'a t) (y:'b t) =
(Obj.magic x) == (Obj.magic y)
let fast_partial_equal (x:not_empty t) (y:not_empty t) =
x == y
end [@@inline]