diff options
-rwxr-xr-x | boot/ocamlc | bin | 894056 -> 896565 bytes | |||
-rwxr-xr-x | boot/ocamllex | bin | 136873 -> 139111 bytes | |||
-rw-r--r-- | camlp4/top/oprint.ml | 2 | ||||
-rw-r--r-- | camlp4/top/rprint.ml | 10 | ||||
-rw-r--r-- | ocamldoc/odoc_sig.ml | 4 | ||||
-rw-r--r-- | otherlibs/labltk/browser/searchid.ml | 2 | ||||
-rw-r--r-- | otherlibs/labltk/browser/searchpos.ml | 2 | ||||
-rw-r--r-- | parsing/parser.mly | 2 | ||||
-rw-r--r-- | parsing/parsetree.mli | 2 | ||||
-rw-r--r-- | parsing/printast.ml | 4 | ||||
-rw-r--r-- | stdlib/sys.ml | 2 | ||||
-rw-r--r-- | tools/depend.ml | 2 | ||||
-rw-r--r-- | toplevel/genprintval.ml | 2 | ||||
-rw-r--r-- | typing/btype.ml | 2 | ||||
-rw-r--r-- | typing/ctype.ml | 6 | ||||
-rw-r--r-- | typing/env.ml | 12 | ||||
-rw-r--r-- | typing/includecore.ml | 4 | ||||
-rw-r--r-- | typing/oprint.ml | 12 | ||||
-rw-r--r-- | typing/outcometree.mli | 2 | ||||
-rw-r--r-- | typing/printtyp.ml | 4 | ||||
-rw-r--r-- | typing/subst.ml | 4 | ||||
-rw-r--r-- | typing/typecore.ml | 32 | ||||
-rw-r--r-- | typing/typecore.mli | 4 | ||||
-rw-r--r-- | typing/typedecl.ml | 16 | ||||
-rw-r--r-- | typing/types.ml | 2 | ||||
-rw-r--r-- | typing/types.mli | 2 |
26 files changed, 69 insertions, 67 deletions
diff --git a/boot/ocamlc b/boot/ocamlc Binary files differindex ffc14dfc4..53f423559 100755 --- a/boot/ocamlc +++ b/boot/ocamlc diff --git a/boot/ocamllex b/boot/ocamllex Binary files differindex 1852faf5e..3d79fab7a 100755 --- a/boot/ocamllex +++ b/boot/ocamllex diff --git a/camlp4/top/oprint.ml b/camlp4/top/oprint.ml index 532fde573..033babad3 100644 --- a/camlp4/top/oprint.ml +++ b/camlp4/top/oprint.ml @@ -169,7 +169,7 @@ and print_simple_out_type ppf = print_fields row_fields print_present tags | Otyp_alias _ _ | Otyp_arrow _ _ _ | Otyp_tuple _ as ty -> fprintf ppf "@[<1>(%a)@]" print_out_type ty - | Otyp_abstract | Otyp_sum _ | Otyp_record _ | Otyp_virtual _ + | Otyp_abstract | Otyp_sum _ | Otyp_record _ | Otyp_private _ | Otyp_manifest _ _ -> () ] and print_fields rest ppf = fun diff --git a/camlp4/top/rprint.ml b/camlp4/top/rprint.ml index 838f425ab..bd00230c9 100644 --- a/camlp4/top/rprint.ml +++ b/camlp4/top/rprint.ml @@ -170,18 +170,18 @@ and print_simple_out_type ppf = | Otyp_manifest ty1 ty2 -> fprintf ppf "@[<2>%a ==@ %a@]" print_out_type ty1 print_out_type ty2 | Otyp_sum constrs -> - fprintf ppf "@[<hv>%a[ %a ]@]" print_virtual v + fprintf ppf "@[<hv>%a[ %a ]@]" print_private v (print_list print_out_constr (fun ppf -> fprintf ppf "@ | ")) constrs | Otyp_record lbls -> - fprintf ppf "@[<hv 2>%a{ %a }@]" print_virtual v + fprintf ppf "@[<hv 2>%a{ %a }@]" print_private v (print_list print_out_label (fun ppf -> fprintf ppf ";@ ")) lbls - | Otyp_virtual tk -> print_tkind True ppf tk + | Otyp_private tk -> print_tkind True ppf tk | Otyp_abstract -> fprintf ppf "'abstract" | Otyp_alias _ _ | Otyp_poly _ _ | Otyp_arrow _ _ _ | Otyp_constr _ [_ :: _] as ty -> fprintf ppf "@[<1>(%a)@]" print_out_type ty ] - and print_virtual ppf v = - if v then fprintf ppf "virtual " else () + and print_private ppf v = + if v then fprintf ppf "private " else () in print_tkind False ppf and print_out_constr ppf (name, tyl) = diff --git a/ocamldoc/odoc_sig.ml b/ocamldoc/odoc_sig.ml index 0570bc024..5c2c1e653 100644 --- a/ocamldoc/odoc_sig.ml +++ b/ocamldoc/odoc_sig.ml @@ -236,7 +236,7 @@ module Analyser = in (0, f name_mutable_type_list) - | Parsetree.Ptype_virtual tkind -> comment_from_tkind tkind in + | Parsetree.Ptype_private tkind -> comment_from_tkind tkind in comment_from_tkind tk @@ -280,7 +280,7 @@ module Analyser = in Odoc_type.Type_record (List.map f l) - | Types.Type_virtual tkind -> get_tkind tkind in + | Types.Type_private tkind -> get_tkind tkind in get_tkind type_kind diff --git a/otherlibs/labltk/browser/searchid.ml b/otherlibs/labltk/browser/searchid.ml index 507219225..2784d22d7 100644 --- a/otherlibs/labltk/browser/searchid.ml +++ b/otherlibs/labltk/browser/searchid.ml @@ -232,7 +232,7 @@ let rec search_type_in_signature t ~sign ~prefix ~mode = List.exists l ~f:(fun (_, l) -> List.exists l ~f:matches) | Type_record(l, rep) -> List.exists l ~f:(fun (_, _, t) -> matches t) - | Type_virtual tkind -> search_tkind tkind in + | Type_private tkind -> search_tkind tkind in search_tkind td.type_kind then [lid_of_id id, Ptype] else [] | Tsig_exception (id, l) -> diff --git a/otherlibs/labltk/browser/searchpos.ml b/otherlibs/labltk/browser/searchpos.ml index 8904c406d..3e6778628 100644 --- a/otherlibs/labltk/browser/searchpos.ml +++ b/otherlibs/labltk/browser/searchpos.ml @@ -172,7 +172,7 @@ let search_pos_type_decl td ~pos ~env = ~f:(fun (_, tl) -> List.iter tl ~f:(search_pos_type ~pos ~env)) | Ptype_record dl -> List.iter dl ~f:(fun (_, _, t) -> search_pos_type t ~pos ~env) - | Ptype_virtual tkind -> search_tkind tkind in + | Ptype_private tkind -> search_tkind tkind in search_tkind td.ptype_kind; List.iter td.ptype_cstrs ~f: begin fun (t1, t2, _) -> diff --git a/parsing/parser.mly b/parsing/parser.mly index 7898c2701..8b97e5ff9 100644 --- a/parsing/parser.mly +++ b/parsing/parser.mly @@ -185,7 +185,7 @@ let bigarray_set arr arg newval = "", newval])) let mktype_kind pflag kind = - if pflag = Private && kind != Ptype_abstract then Ptype_virtual kind else kind + if pflag = Private && kind != Ptype_abstract then Ptype_private kind else kind %} diff --git a/parsing/parsetree.mli b/parsing/parsetree.mli index 652a411df..69763d256 100644 --- a/parsing/parsetree.mli +++ b/parsing/parsetree.mli @@ -131,7 +131,7 @@ and type_kind = Ptype_abstract | Ptype_variant of (string * core_type list) list | Ptype_record of (string * mutable_flag * core_type) list - | Ptype_virtual of type_kind + | Ptype_private of type_kind and exception_declaration = core_type list diff --git a/parsing/printast.ml b/parsing/printast.ml index a44c61efe..5ea5d4e0d 100644 --- a/parsing/printast.ml +++ b/parsing/printast.ml @@ -320,7 +320,9 @@ and type_kind i ppf x = | Ptype_record (l) -> line i ppf "Ptype_record\n"; list (i+1) string_x_mutable_flag_x_core_type ppf l; - | Ptype_virtual x -> type_kind i ppf x + | Ptype_private x -> + line i ppf "Ptype_private\n"; + type_kind (i + 1) ppf x and exception_declaration i ppf x = list i core_type ppf x diff --git a/stdlib/sys.ml b/stdlib/sys.ml index bde8b57d2..5d40b105f 100644 --- a/stdlib/sys.ml +++ b/stdlib/sys.ml @@ -78,4 +78,4 @@ let catch_break on = (* OCaml version string, must be in the format described in sys.mli. *) -let ocaml_version = "3.06+29 (2003-04-29)";; +let ocaml_version = "3.06+30 (2003-05-02)";; diff --git a/tools/depend.ml b/tools/depend.ml index 98772d8ec..7b343a852 100644 --- a/tools/depend.ml +++ b/tools/depend.ml @@ -73,7 +73,7 @@ let add_type_declaration bv td = List.iter (fun (c, args) -> List.iter (add_type bv) args) cstrs | Ptype_record lbls -> List.iter (fun (l, mut, ty) -> add_type bv ty) lbls - | Ptype_virtual tkind -> add_tkind tkind in + | Ptype_private tkind -> add_tkind tkind in add_tkind td.ptype_kind let rec add_class_type bv cty = diff --git a/toplevel/genprintval.ml b/toplevel/genprintval.ml index 4828019f7..9b760e63d 100644 --- a/toplevel/genprintval.ml +++ b/toplevel/genprintval.ml @@ -277,7 +277,7 @@ module Make(O : OBJ)(EVP : EVALPATH with type value = O.t) = struct in Oval_record (tree_of_fields 0 lbl_list) end - | {type_kind = Type_virtual tkind} -> + | {type_kind = Type_private tkind} -> tree_decl {decl with type_kind = tkind} in tree_decl decl with diff --git a/typing/btype.ml b/typing/btype.ml index c6fa59fba..31b512cbc 100644 --- a/typing/btype.ml +++ b/typing/btype.ml @@ -255,7 +255,7 @@ let unmark_type_decl decl = List.iter (fun (c, tl) -> List.iter unmark_type tl) cstrs | Type_record(lbls, rep) -> List.iter (fun (c, mut, t) -> unmark_type t) lbls - | Type_virtual tkind -> unmark_tkind tkind in + | Type_private tkind -> unmark_tkind tkind in unmark_tkind decl.type_kind; begin match decl.type_manifest with None -> () diff --git a/typing/ctype.ml b/typing/ctype.ml index 361f0a8f8..7ab6b8c71 100644 --- a/typing/ctype.ml +++ b/typing/ctype.ml @@ -429,7 +429,7 @@ let closed_type_decl decl = List.iter (fun (_, tyl) -> List.iter closed_type tyl) v | Type_record(r, rep) -> List.iter (fun (_, _, ty) -> closed_type ty) r - | Type_virtual tkind -> closed_tkind tkind in + | Type_private tkind -> closed_tkind tkind in closed_tkind decl.type_kind; begin match decl.type_manifest with None -> () @@ -3073,7 +3073,7 @@ let nondep_type_decl env mid id is_covariant decl = (fun (c, mut, t) -> (c, mut, nondep_type_rec env mid t)) lbls, rep) - | Type_virtual tkind -> Type_virtual (kind_of_tkind tkind) in + | Type_private tkind -> Type_private (kind_of_tkind tkind) in kind_of_tkind decl.type_kind with Not_found when is_covariant -> Type_abstract @@ -3098,7 +3098,7 @@ let nondep_type_decl env mid id is_covariant decl = List.iter (fun (c, tl) -> List.iter unmark_type tl) cstrs | Type_record(lbls, rep) -> List.iter (fun (c, mut, t) -> unmark_type t) lbls - | Type_virtual tkind -> unmark_tkind tkind in + | Type_private tkind -> unmark_tkind tkind in unmark_tkind decl.type_kind; begin match decl.type_manifest with None -> () diff --git a/typing/env.ml b/typing/env.ml index 341b4c517..33788d479 100644 --- a/typing/env.ml +++ b/typing/env.ml @@ -380,12 +380,12 @@ let rec scrape_modtype mty env = let constructors_of_type ty_path decl = let rec constructors_of_tkind = function - Type_variant cstrs -> + | Type_variant cstrs -> Datarepr.constructor_descrs (Btype.newgenty (Tconstr(ty_path, decl.type_params, ref Mnil))) cstrs - | Type_virtual tkind -> constructors_of_tkind tkind - | _ -> [] in + | Type_private tkind -> constructors_of_tkind tkind + | Type_record _ | Type_abstract -> [] in constructors_of_tkind decl.type_kind @@ -393,12 +393,12 @@ let constructors_of_type ty_path decl = let labels_of_type ty_path decl = let rec labels_of_tkind = function - Type_record(labels, rep) -> + | Type_record(labels, rep) -> Datarepr.label_descrs (Btype.newgenty (Tconstr(ty_path, decl.type_params, ref Mnil))) labels rep - | Type_virtual tkind -> labels_of_tkind tkind - | _ -> [] in + | Type_private tkind -> labels_of_tkind tkind + | Type_variant _ | Type_abstract -> [] in labels_of_tkind decl.type_kind (* Given a signature and a root path, prefix all idents in the signature diff --git a/typing/includecore.ml b/typing/includecore.ml index f70caba89..63050cf6d 100644 --- a/typing/includecore.ml +++ b/typing/includecore.ml @@ -58,8 +58,8 @@ let type_declarations env id decl1 decl2 = Ctype.equal env true (ty1::decl1.type_params) (ty2::decl2.type_params)) labels1 labels2 - | (Type_virtual tkind1, Type_virtual tkind2) -> incl_tkinds (tkind1, tkind2) - | (tkind1, Type_virtual tkind2) -> incl_tkinds (tkind1, tkind2) + | (Type_private tkind1, Type_private tkind2) -> incl_tkinds (tkind1, tkind2) + | (tkind1, Type_private tkind2) -> incl_tkinds (tkind1, tkind2) | (_, _) -> false in incl_tkinds (decl1.type_kind, decl2.type_kind) && diff --git a/typing/oprint.ml b/typing/oprint.ml index 879447a76..9a2f9b23f 100644 --- a/typing/oprint.ml +++ b/typing/oprint.ml @@ -186,7 +186,7 @@ and print_simple_out_type ppf = print_present tags | Otyp_alias _ | Otyp_poly _ | Otyp_arrow _ | Otyp_tuple _ as ty -> fprintf ppf "@[<1>(%a)@]" print_out_type ty - | Otyp_abstract | Otyp_sum _ | Otyp_record _ | Otyp_virtual _ + | Otyp_abstract | Otyp_sum _ | Otyp_record _ | Otyp_private _ | Otyp_manifest (_, _) -> () and print_fields rest ppf = function @@ -366,22 +366,22 @@ and print_out_type_decl kwd ppf (name, args, ty, constraints) = Otyp_manifest (_, ty) -> ty | _ -> ty in - let print_virtual ppf v = if v then fprintf ppf "virtual " in + let print_private ppf v = if v then fprintf ppf "private " in let rec print_out_tkind v = function - Otyp_abstract -> + | Otyp_abstract -> fprintf ppf "@[<2>@[<hv 2>%t@]%a@]" print_name_args print_constraints constraints | Otyp_record lbls -> fprintf ppf "@[<2>@[<hv 2>%t = %a{%a@;<1 -2>}@]%a@]" print_name_args - print_virtual v + print_private v (print_list_init print_out_label (fun ppf -> fprintf ppf "@ ")) lbls print_constraints constraints | Otyp_sum constrs -> fprintf ppf "@[<2>@[<hv 2>%t =@;<1 2>%a%a@]%a@]" print_name_args - print_virtual v + print_private v (print_list print_out_constr (fun ppf -> fprintf ppf "@ | ")) constrs print_constraints constraints - | Otyp_virtual ty -> print_out_tkind true ty + | Otyp_private ty -> print_out_tkind true ty | ty -> fprintf ppf "@[<2>@[<hv 2>%t =@ %a@]%a@]" print_name_args !out_type ty print_constraints constraints in diff --git a/typing/outcometree.mli b/typing/outcometree.mli index a6e732027..051ce47e6 100644 --- a/typing/outcometree.mli +++ b/typing/outcometree.mli @@ -55,7 +55,7 @@ type out_type = | Otyp_record of (string * bool * out_type) list | Otyp_stuff of string | Otyp_sum of (string * out_type list) list - | Otyp_virtual of out_type + | Otyp_private of out_type | Otyp_tuple of out_type list | Otyp_var of bool * string | Otyp_variant of diff --git a/typing/printtyp.ml b/typing/printtyp.ml index 19bb1c0e0..c8512bf1b 100644 --- a/typing/printtyp.ml +++ b/typing/printtyp.ml @@ -416,7 +416,7 @@ let rec tree_of_type_decl id decl = List.iter (fun (_, args) -> List.iter mark_loops args) cstrs | Type_record(l, rep) -> List.iter (fun (_, _, ty) -> mark_loops ty) l - | Type_virtual tkind -> mark tkind in + | Type_private tkind -> mark tkind in mark decl.type_kind; let type_param = @@ -458,7 +458,7 @@ let rec tree_of_type_decl id decl = tree_of_manifest decl (Otyp_sum (List.map tree_of_constructor cstrs)) | Type_record(lbls, rep) -> tree_of_manifest decl (Otyp_record (List.map tree_of_label lbls)) - | Type_virtual tkind -> Otyp_virtual (tree_of_tkind tkind) in + | Type_private tkind -> Otyp_private (tree_of_tkind tkind) in let ty = tree_of_tkind decl.type_kind in (name, args, ty, constraints) diff --git a/typing/subst.ml b/typing/subst.ml index b40079b65..99e6d7634 100644 --- a/typing/subst.ml +++ b/typing/subst.ml @@ -156,7 +156,7 @@ let type_declaration s decl = type_kind = begin let rec kind_of_tkind = function - Type_abstract -> Type_abstract + | Type_abstract -> Type_abstract | Type_variant cstrs -> Type_variant( List.map (fun (n, args) -> (n, List.map (typexp s) args)) @@ -166,7 +166,7 @@ let type_declaration s decl = List.map (fun (n, mut, arg) -> (n, mut, typexp s arg)) lbls, rep) - | Type_virtual tkind -> Type_virtual (kind_of_tkind tkind) in + | Type_private tkind -> Type_private (kind_of_tkind tkind) in kind_of_tkind decl.type_kind end; type_manifest = diff --git a/typing/typecore.ml b/typing/typecore.ml index 329ea66ed..9fa48ad45 100644 --- a/typing/typecore.ml +++ b/typing/typecore.ml @@ -42,8 +42,8 @@ type error = | Undefined_inherited_method of string | Unbound_class of Longident.t | Virtual_class of Longident.t - | Virtual_type of string - | Virtual_type_setfield of Longident.t * string + | Private_type of string + | Private_type_setfield of Longident.t * string | Unbound_instance_variable of string | Instance_variable_not_mutable of string | Not_subtype of (type_expr * type_expr) list * (type_expr * type_expr) list @@ -124,28 +124,28 @@ let rec extract_label_names sexp env ty = | Type_record (fields, _) -> List.map (fun (name, _, _) -> name) fields | Type_abstract when td.type_manifest <> None -> extract_label_names sexp env (expand_head env ty) - | Type_virtual tkind -> - raise (Error(sexp.pexp_loc, Virtual_type (Path.name path))) + | Type_private tkind -> + raise (Error(sexp.pexp_loc, Private_type (Path.name path))) | _ -> assert false in extract td.type_kind | _ -> assert false -let check_virtual get_exc loc env ty = +let check_private get_exc loc env ty = let ty = repr ty in match ty.desc with | Tconstr (path, _, _) -> let td = Env.find_type path env in begin match td.type_kind with - | Type_virtual tkind -> + | Type_private tkind -> raise (Error(loc, get_exc (Path.name path))) | _ -> () end | _ -> assert false -let check_virtual_type = check_virtual (fun s -> Virtual_type s) -let check_virtual_type_setfield lid = - check_virtual (fun s -> Virtual_type_setfield (lid, s)) +let check_private_type = check_private (fun s -> Private_type s) +let check_private_type_setfield lid = + check_private (fun s -> Private_type_setfield (lid, s)) (* Typing of patterns *) @@ -986,7 +986,7 @@ let rec type_exp env sexp = let missing = missing_labels 0 label_names in raise(Error(sexp.pexp_loc, Label_missing missing)) end; - check_virtual_type sexp.pexp_loc env ty; + check_private_type sexp.pexp_loc env ty; re { exp_desc = Texp_record(lbl_exp_list, opt_exp); exp_loc = sexp.pexp_loc; @@ -1023,7 +1023,7 @@ let rec type_exp env sexp = if vars <> [] && not (is_nonexpansive newval) then generalize_expansive env newval.exp_type; check_univars env "field value" newval label.lbl_arg vars; - check_virtual_type_setfield lid sexp.pexp_loc env ty_res; + check_private_type_setfield lid sexp.pexp_loc env ty_res; re { exp_desc = Texp_setfield(record, label, newval); exp_loc = sexp.pexp_loc; @@ -1612,7 +1612,7 @@ and type_construct env loc lid sarg explicit_arity ty_expected = exp_env = env } in unify_exp env texp ty_expected; let args = List.map2 (type_argument env) sargs ty_args in - check_virtual_type loc env ty_res; + check_private_type loc env ty_res; { texp with exp_desc = Texp_construct(constr, args) } (* Typing of an expression with an expected type. @@ -2007,10 +2007,10 @@ let report_error ppf = function "The instance variable %a@ \ cannot be accessed from the definition of another instance variable" longident lid - | Virtual_type ty -> - fprintf ppf "One cannot create values of the virtual type %s" ty - | Virtual_type_setfield (lid, ty) -> - fprintf ppf "Cannot assign field %a of the virtual type %s" + | Private_type ty -> + fprintf ppf "One cannot create values of the private type %s" ty + | Private_type_setfield (lid, ty) -> + fprintf ppf "Cannot assign field %a of the private type %s" longident lid ty | Not_a_variant_type lid -> fprintf ppf "The type %a@ is not a variant type" longident lid diff --git a/typing/typecore.mli b/typing/typecore.mli index 9a5531801..4bd6f1945 100644 --- a/typing/typecore.mli +++ b/typing/typecore.mli @@ -79,8 +79,8 @@ type error = | Undefined_inherited_method of string | Unbound_class of Longident.t | Virtual_class of Longident.t - | Virtual_type of string - | Virtual_type_setfield of Longident.t * string + | Private_type of string + | Private_type_setfield of Longident.t * string | Unbound_instance_variable of string | Instance_variable_not_mutable of string | Not_subtype of (type_expr * type_expr) list * (type_expr * type_expr) list diff --git a/typing/typedecl.ml b/typing/typedecl.ml index f14a3ab37..38884f12e 100644 --- a/typing/typedecl.ml +++ b/typing/typedecl.ml @@ -140,7 +140,7 @@ let transl_declaration env (name, sdecl) id = then Record_float else Record_regular in Type_record(lbls', rep) - | Ptype_virtual kind -> Type_virtual (get_tkind kind) in + | Ptype_private kind -> Type_private (get_tkind kind) in get_tkind sdecl.ptype_kind end; type_manifest = @@ -170,17 +170,17 @@ let transl_declaration env (name, sdecl) id = let generalize_decl decl = List.iter Ctype.generalize decl.type_params; let rec gen = function - Type_abstract -> + | Type_abstract -> () | Type_variant v -> List.iter (fun (_, tyl) -> List.iter Ctype.generalize tyl) v | Type_record(r, rep) -> List.iter (fun (_, _, ty) -> Ctype.generalize ty) r - | Type_virtual tkind -> + | Type_private tkind -> gen tkind in gen decl.type_kind; begin match decl.type_manifest with - None -> () + | None -> () | Some ty -> Ctype.generalize ty end @@ -225,7 +225,7 @@ let check_constraints env (_, sdecl) (_, decl) = | Type_variant l -> let rec find_pl = function Ptype_variant pl -> pl - | Ptype_virtual tkind -> find_pl tkind + | Ptype_private tkind -> find_pl tkind | Ptype_record _ | Ptype_abstract -> assert false in let pl = find_pl sdecl.ptype_kind in @@ -239,7 +239,7 @@ let check_constraints env (_, sdecl) (_, decl) = | Type_record (l, _) -> let rec find_pl = function Ptype_record pl -> pl - | Ptype_virtual tkind -> find_pl tkind + | Ptype_private tkind -> find_pl tkind | Ptype_variant _ | Ptype_abstract -> assert false in let pl = find_pl sdecl.ptype_kind in @@ -252,7 +252,7 @@ let check_constraints env (_, sdecl) (_, decl) = (fun (name, _, ty) -> check_constraints_rec env (get_loc name pl) visited ty) l - | Type_virtual tkind -> check tkind in + | Type_private tkind -> check tkind in check decl.type_kind; begin match decl.type_manifest with | None -> () @@ -431,7 +431,7 @@ let compute_variance_decl env decl (required, loc) = List.iter (fun (_, mut, ty) -> compute_variance env tvl true (mut = Mutable) ty) ftl - | Type_virtual tkind -> variance_tkind tkind in + | Type_private tkind -> variance_tkind tkind in variance_tkind decl.type_kind; List.map2 (fun (_, co, cn) (c, n) -> diff --git a/typing/types.ml b/typing/types.ml index b7ddd3141..6d67a89f0 100644 --- a/typing/types.ml +++ b/typing/types.ml @@ -140,7 +140,7 @@ and type_kind = | Type_variant of (string * type_expr list) list | Type_record of (string * mutable_flag * type_expr) list * record_representation - | Type_virtual of type_kind + | Type_private of type_kind type exception_declaration = type_expr list diff --git a/typing/types.mli b/typing/types.mli index 019d8fb7c..c2a219db3 100644 --- a/typing/types.mli +++ b/typing/types.mli @@ -141,7 +141,7 @@ and type_kind = | Type_variant of (string * type_expr list) list | Type_record of (string * mutable_flag * type_expr) list * record_representation - | Type_virtual of type_kind + | Type_private of type_kind type exception_declaration = type_expr list |