You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7428 Reporter: Christophe Raffalli Assigned to:@gasche Status: resolved (set by @gasche on 2016-12-06T18:24:44Z) Resolution: duplicate Priority: normal Severity: feature Version: 4.04.0 Category: standard library Duplicate of:#7425
Bug description
I would like the following (or equivalent) to be added somewhere
in the stdlib. This sound type safe and sometimes very useful,
by avoiding a runtime representation of the type.
Could we keep discussing this in 7425 where the discussion started? I can rename the other ticket with a more explicit name for the current discussion if you think that is helpful.
Original bug ID: 7428
Reporter: Christophe Raffalli
Assigned to: @gasche
Status: resolved (set by @gasche on 2016-12-06T18:24:44Z)
Resolution: duplicate
Priority: normal
Severity: feature
Version: 4.04.0
Category: standard library
Duplicate of: #7425
Bug description
I would like the following (or equivalent) to be added somewhere
in the stdlib. This sound type safe and sometimes very useful,
by avoiding a runtime representation of the type.
type ('a,'b) eq = Eq : ('a, 'a) eq | Neq : ('a, 'b) eq
let (===) : type a b.a ref -> b ref -> (a,b) eq = fun r1 r2 ->
if Obj.repr r1 == Obj.repr r2 then Obj.magic Eq else Neq
The text was updated successfully, but these errors were encountered: