diff options
author | Alain Frisch <alain@frisch.fr> | 2014-04-01 11:46:00 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2014-04-01 11:46:00 +0000 |
commit | d75e2c8b01ffd0e7430be98203de3f571efee1aa (patch) | |
tree | 1094592d6e199a2a8fd9a00450bcf86b2b03b300 /toplevel | |
parent | ce4c5fad1de201f08679bcb53baf6456a1fda47a (diff) |
Support for record arguments on exceptions.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record2@14515 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'toplevel')
-rw-r--r-- | toplevel/genprintval.ml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/toplevel/genprintval.ml b/toplevel/genprintval.ml index 3b184cec0..5dc829b52 100644 --- a/toplevel/genprintval.ml +++ b/toplevel/genprintval.ml @@ -293,7 +293,12 @@ module Make(O : OBJ)(EVP : EVALPATH with type valu = O.t) = struct in (lid, v) :: tree_of_fields (pos + 1) remainder in - Oval_record (tree_of_fields 0 lbl_list) + let pos = + match rep with + | Record_exception _ -> 1 + | _ -> 0 + in + Oval_record (tree_of_fields pos lbl_list) end with Not_found -> (* raised by Env.find_type *) @@ -379,7 +384,8 @@ module Make(O : OBJ)(EVP : EVALPATH with type valu = O.t) = struct if not (EVP.same_value slot (EVP.eval_path env path)) then raise Not_found; tree_of_constr_with_args - (fun x -> Oide_ident x) name false 1 depth bucket cstr.cstr_args + (fun x -> Oide_ident x) name cstr.cstr_inlined 1 depth bucket + cstr.cstr_args with Not_found | EVP.Error -> match check_depth depth bucket ty with Some x -> x |