Modification de Ctype.substitute (un argument en moins) et

Types.Tconstr.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1246 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jérôme Vouillon 1997-01-23 12:46:03 +00:00
parent 6c452fe5f5
commit 137d8117c6
2 changed files with 4 additions and 4 deletions

View File

@ -129,7 +129,7 @@ and find_label lbl env ty path tydesc pos = function
| (name, mut, ty_arg) :: rem ->
if name = lbl then begin
let descr =
{ lbl_res = Ctype.newty(Tconstr(path, tydesc.type_params, ref []));
{ lbl_res = Ctype.newty(Tconstr(path, tydesc.type_params, ref Mnil));
lbl_arg = ty_arg; lbl_mut = mut; lbl_pos = pos;
lbl_all = [||]; lbl_repres = Record_regular } in
let (ty_arg, ty_res) = Ctype.instance_label descr in

View File

@ -193,7 +193,7 @@ let print_value max_depth obj ty env =
print_string "<abstr>"
| {type_kind = Type_abstract; type_manifest = Some body} ->
print_val prio depth obj
(Ctype.substitute [] decl.type_params ty_list body)
(Ctype.substitute decl.type_params ty_list body)
| {type_kind = Type_variant constr_list} ->
let tag =
if Debugcom.remote_value_is_int obj then
@ -204,7 +204,7 @@ let print_value max_depth obj ty env =
let (constr_name, constr_args) =
find_constr tag 0 0 constr_list in
let ty_args =
List.map (Ctype.substitute [] decl.type_params ty_list)
List.map (Ctype.substitute decl.type_params ty_list)
constr_args in
begin match ty_args with
[] ->
@ -245,7 +245,7 @@ let print_value max_depth obj ty env =
print_string lbl_name;
print_string "="; print_cut();
let ty_arg =
Ctype.substitute [] decl.type_params ty_list lbl_arg in
Ctype.substitute decl.type_params ty_list lbl_arg in
cautious
(print_val 0 (depth - 1) (Debugcom.get_field obj pos))
ty_arg;