Commits

Dmitry Grebeniuk  committed 382a2e3

.

  • Participants
  • Parent commits db751ce

Comments (0)

Files changed (3)

-^_build/
-^log$
-^dyntest.exe$
+^_build/
+^log$
+^dyntest.(exe|byte|native)$
+ocamlbuild dyntest.native
   ((Obj.obj (Obj.field ty 0)) : string)
 ;
 
-value get ((ty_name, ty_ref) as ty) (x_ty_repr, x_val_repr) =
+value get (((ty_name, ty_ref) : ty 'a) as ty) (x_ty_repr, x_val_repr) =
   if (Obj.repr ty) != x_ty_repr
   then
     raise (Type_error ((name_of_ty_repr x_ty_repr), ty_name))
   else
-    let v = Obj.obj x_val_repr in
-    ( if 1<>1 then ty_ref.val := v else ()
-    ; v
+    (fun x ->
+       ( if 1 <> 1 then ty_ref.val := Some x else ()
+       ; x
+       )
     )
+    (Obj.obj x_val_repr)
 ;