@@ -30,9 +30,6 @@ type error =
3030  | Unbound_type_constructor  of  Longident .t 
3131  | Unbound_type_constructor_2  of  Path .t 
3232  | Type_arity_mismatch  of  Longident .t  *  int  *  int 
33-   | Bound_type_variable  of  string 
34-   | Recursive_type 
35-   | Unbound_row_variable  of  Longident .t 
3633  | Type_mismatch  of  (type_expr  *  type_expr ) list 
3734  | Alias_type_mismatch  of  (type_expr  *  type_expr ) list 
3835  | Present_has_conjunction  of  string 
@@ -131,7 +128,6 @@ let find_constructor =
131128let  find_all_constructors = 
132129  find_component Env. lookup_all_constructors (fun  lid  ->
133130      Unbound_constructor  lid)
134- let  find_label =  find_component Env. lookup_label (fun  lid  -> Unbound_label  lid)
135131let  find_all_labels = 
136132  find_component Env. lookup_all_labels (fun  lid  -> Unbound_label  lid)
137133
@@ -232,11 +228,6 @@ let validate_name = function
232228let  new_global_var  ?name   ()  =  new_global_var ?name:(validate_name name) () 
233229let  newvar  ?name   ()  =  newvar ?name:(validate_name name) () 
234230
235- let  type_variable  loc  name  = 
236-   try  Tbl. find name ! type_variables
237-   with  Not_found  -> 
238-     raise (Error  (loc, Env. empty, Unbound_type_variable  (" '"   ^  name)))
239- 
240231let  transl_type_param  env  styp  = 
241232  let  loc =  styp.ptyp_loc in 
242233  match  styp.ptyp_desc with 
@@ -668,8 +659,6 @@ let make_fixed_univars ty =
668659  make_fixed_univars ty;
669660  Btype. unmark_type ty
670661
671- let  create_package_mty =  create_package_mty false 
672- 
673662let  globalize_used_variables  env  fixed  = 
674663  let  r =  ref  []  in 
675664  Tbl. iter
@@ -709,40 +698,6 @@ let transl_simple_type env fixed styp =
709698  make_fixed_univars typ.ctyp_type;
710699  typ
711700
712- let  transl_simple_type_univars  env  styp  = 
713-   univars :=  [] ;
714-   used_variables :=  Tbl. empty;
715-   pre_univars :=  [] ;
716-   begin_def () ;
717-   let  typ =  transl_type env Univars  styp in 
718-   (*  Only keep already global variables in used_variables *) 
719-   let  new_variables =  ! used_variables in 
720-   used_variables :=  Tbl. empty;
721-   Tbl. iter
722-     (fun  name  p  ->
723-       if  Tbl. mem name ! type_variables then 
724-         used_variables :=  Tbl. add name p ! used_variables)
725-     new_variables;
726-   globalize_used_variables env false  () ;
727-   end_def () ;
728-   generalize typ.ctyp_type;
729-   let  univs = 
730-     List. fold_left
731-       (fun  acc  v  ->
732-         let  v =  repr v in 
733-         match  v.desc with 
734-         |  Tvar  name  when  v.level =  Btype. generic_level ->
735-           v.desc < -  Tunivar  name;
736-           v :: acc
737-         |  _  -> acc)
738-       []  ! pre_univars
739-   in 
740-   make_fixed_univars typ.ctyp_type;
741-   {
742-     typ with 
743-     ctyp_type =  instance env (Btype. newgenty (Tpoly  (typ.ctyp_type, univs)));
744-   }
745- 
746701let  transl_simple_type_delayed  env  styp  = 
747702  univars :=  [] ;
748703  used_variables :=  Tbl. empty;
@@ -836,13 +791,6 @@ let report_error env ppf = function
836791        " @[The type constructor %a@ expects %i argument(s),@ but is here \
837792         applied to %i argument(s)@]"  
838793        longident lid expected provided
839-   |  Bound_type_variable  name  ->
840-     fprintf ppf " Already bound type parameter '%s"   name
841-   |  Recursive_type  -> fprintf ppf " This type is recursive" 
842-   |  Unbound_row_variable  lid  ->
843-     (*  we don't use "spellcheck" here: this error is not raised
844-        anywhere so it's unclear how it should be handled *)  
845-     fprintf ppf " Unbound row variable in #%a"   longident lid
846794  |  Type_mismatch  trace  ->
847795    Printtyp. report_unification_error ppf Env. empty trace
848796      (function 
0 commit comments