consistently make temporary local type idents local idents

master
Thomas Refis 2018-09-13 10:37:08 +01:00
parent 8641a978f6
commit 94b55c1584
6 changed files with 5 additions and 13 deletions

Binary file not shown.

Binary file not shown.

View File

@ -37,11 +37,7 @@ type error =
exception Error of error
let abstract_type =
Btype.newgenty (
Tconstr
(Pident (
Ident.create_scoped ~scope:Btype.lowest_level "<abstr>"), [], ref Mnil)
)
Btype.newgenty (Tconstr (Pident (Ident.create_local "<abstr>"), [], ref Mnil))
let rec path event = function
Pident id ->

View File

@ -222,10 +222,8 @@ module Make(O : OBJ)(EVP : EVALPATH with type valu = O.t) = struct
(* An abstract type *)
let abstract_type =
let scope = Ctype.get_current_level () in
let id = Ident.create_scoped ~scope "abstract" in
let ty = Ctype.newty (Tconstr (Pident id, [], ref Mnil)) in
Ctype.init_def (scope + 1);
let id = Ident.create_local "abstract" in
let ty = Btype.newgenty (Tconstr (Pident id, [], ref Mnil)) in
ty
(* The main printing function *)

View File

@ -101,7 +101,7 @@ let dummy_method = Btype.dummy_method
(its constructor is not available).
*)
let unbound_class =
Path.Pident (Ident.create_scoped ~scope:Btype.lowest_level "*undef*")
Path.Pident (Ident.create_local "*undef*")
(************************************)

View File

@ -470,9 +470,7 @@ let merge_constraint initial_env remove_aliases loc sg constr =
type_immediate = false;
type_unboxed = unboxed_false_default_false;
}
and id_row = Ident.create_scoped ~scope:(Ctype.get_current_level ())
(s^"#row")
in
and id_row = Ident.create_local (s^"#row") in
let initial_env =
Env.add_type ~check:false id_row decl_row initial_env
in