diff options
author | Alain Frisch <alain@frisch.fr> | 2013-03-05 12:37:17 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2013-03-05 12:37:17 +0000 |
commit | b01b7305bd71e9d9aacb2b1274fbb064f1beee64 (patch) | |
tree | 76f027790f081f93e61ee392c04a52237b3726c0 /tools | |
parent | 8823b9dd6ca1b3a5ba741b3b0023721adfd1d9f5 (diff) | |
download | ocaml-b01b7305bd71e9d9aacb2b1274fbb064f1beee64.tar.gz |
Put name in the exception_declaration record.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13350 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depend.ml | 4 | ||||
-rw-r--r-- | tools/untypeast.ml | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/tools/depend.ml b/tools/depend.ml index 7c5d284fbc..05b9c92905 100644 --- a/tools/depend.ml +++ b/tools/depend.ml @@ -221,7 +221,7 @@ and add_sig_item bv item = add_type bv vd.pval_type; bv | Psig_type dcls -> List.iter (fun (id, td) -> add_type_declaration bv td) dcls; bv - | Psig_exception(id, ped) -> + | Psig_exception ped -> List.iter (add_type bv) ped.ped_args; bv | Psig_module pmd -> add_modtype bv pmd.pmd_type; StringSet.add pmd.pmd_name.txt bv @@ -277,7 +277,7 @@ and add_struct_item bv item = add_type bv vd.pval_type; bv | Pstr_type dcls -> List.iter (fun (id, td) -> add_type_declaration bv td) dcls; bv - | Pstr_exception(id, ped) -> + | Pstr_exception ped -> List.iter (add_type bv) ped.ped_args; bv | Pstr_exn_rebind(id, l) -> add bv l; bv diff --git a/tools/untypeast.ml b/tools/untypeast.ml index dd2e7e9f27..8e193a0d14 100644 --- a/tools/untypeast.ml +++ b/tools/untypeast.ml @@ -53,7 +53,7 @@ and untype_structure_item item = Pstr_type (List.map (fun (_id, name, decl) -> name, untype_type_declaration decl) list) | Tstr_exception (_id, name, decl) -> - Pstr_exception (name, untype_exception_declaration decl) + Pstr_exception (untype_exception_declaration name decl) | Tstr_exn_rebind (_id, name, _p, lid) -> Pstr_exn_rebind (name, lid) | Tstr_module (_id, name, mexpr) -> @@ -127,8 +127,9 @@ and untype_type_declaration decl = ptype_loc = decl.typ_loc; } -and untype_exception_declaration decl = +and untype_exception_declaration name decl = { + ped_name = name; ped_args = List.map untype_core_type decl.exn_params; ped_attributes = []; } @@ -316,7 +317,7 @@ and untype_signature_item item = name, untype_type_declaration decl ) list) | Tsig_exception (_id, name, decl) -> - Psig_exception (name, untype_exception_declaration decl) + Psig_exception (untype_exception_declaration name decl) | Tsig_module (_id, name, mtype) -> Psig_module {pmd_name = name; pmd_type = untype_module_type mtype; pmd_attributes = []} | Tsig_recmodule list -> @@ -349,7 +350,7 @@ and untype_class_description cd = pci_expr = untype_class_type cd.ci_expr; pci_variance = cd.ci_variance; pci_loc = cd.ci_loc; - pci_attributes = []; + pci_attributes = []; } and untype_class_type_declaration cd = |