@@ -6158,10 +6158,9 @@ module Cmi_format : sig
61586158(**************************************************************************)
61596159
61606160type pers_flags =
6161- | Rectypes
61626161 | Deprecated of string
6163- | Opaque
6164- | Unsafe_string
6162+
6163+
61656164
61666165type cmi_infos = {
61676166 cmi_name : string;
@@ -6212,10 +6211,9 @@ end = struct
62126211(**************************************************************************)
62136212
62146213type pers_flags =
6215- | Rectypes
62166214 | Deprecated of string
6217- | Opaque
6218- | Unsafe_string
6215+
6216+
62196217
62206218type error =
62216219 Not_an_interface of string
@@ -14658,8 +14656,7 @@ val crc_of_unit: string -> Digest.t
1465814656
1465914657val imports: unit -> (string * Digest.t option) list
1466014658
14661- (* [is_imported_opaque md] returns true if [md] is an opaque imported module *)
14662- val is_imported_opaque: string -> bool
14659+
1466314660
1466414661(* Direct access to the table of imported compilation units with their CRC *)
1466514662
@@ -14684,7 +14681,6 @@ type error =
1468414681 | Illegal_renaming of string * string * string
1468514682 | Inconsistent_import of string * string * string
1468614683 | Need_recursive_types of string * string
14687- | Depend_on_unsafe_string_unit of string * string
1468814684 | Missing_module of Location.t * Path.t * Path.t
1468914685 | Illegal_value_name of Location.t * string
1469014686
@@ -14837,7 +14833,6 @@ type error =
1483714833 | Illegal_renaming of string * string * string
1483814834 | Inconsistent_import of string * string * string
1483914835 | Need_recursive_types of string * string
14840- | Depend_on_unsafe_string_unit of string * string
1484114836 | Missing_module of Location.t * Path.t * Path.t
1484214837 | Illegal_value_name of Location.t * string
1484314838
@@ -15435,15 +15430,11 @@ let imported_units = ref StringSet.empty
1543515430let add_import s =
1543615431 imported_units := StringSet.add s !imported_units
1543715432
15438- let imported_opaque_units = ref StringSet.empty
15439-
15440- let add_imported_opaque s =
15441- imported_opaque_units := StringSet.add s !imported_opaque_units
1544215433
1544315434let clear_imports () =
1544415435 Consistbl.clear crc_units;
15445- imported_units := StringSet.empty;
15446- imported_opaque_units := StringSet.empty
15436+ imported_units := StringSet.empty
15437+
1544715438
1544815439let check_consistency ps =
1544915440 try
@@ -15463,13 +15454,6 @@ let check_consistency ps =
1546315454let save_pers_struct crc ps =
1546415455 let modname = ps.ps_name in
1546515456 Hashtbl.add persistent_structures modname (Some ps);
15466- List.iter
15467- (function
15468- | Rectypes -> ()
15469- | Deprecated _ -> ()
15470- | Unsafe_string -> ()
15471- | Opaque -> add_imported_opaque modname)
15472- ps.ps_flags;
1547315457 Consistbl.set crc_units modname crc ps.ps_filename;
1547415458 add_import modname
1547515459
@@ -15491,7 +15475,7 @@ let acknowledge_pers_struct check modname
1549115475 let crcs = cmi.cmi_crcs in
1549215476 let flags = cmi.cmi_flags in
1549315477 let deprecated =
15494- List.fold_left (fun acc -> function Deprecated s -> Some s | _ -> acc ) None
15478+ List.fold_left (fun _ -> function Deprecated s -> Some s ) None
1549515479 flags
1549615480 in
1549715481 let comps =
@@ -15509,16 +15493,6 @@ let acknowledge_pers_struct check modname
1550915493 } in
1551015494 if ps.ps_name <> modname then
1551115495 error (Illegal_renaming(modname, ps.ps_name, filename));
15512-
15513- List.iter
15514- (function
15515- | Rectypes ->
15516- error (Need_recursive_types(ps.ps_name, !current_unit))
15517- | Unsafe_string ->
15518- error (Depend_on_unsafe_string_unit (ps.ps_name, !current_unit));
15519- | Deprecated _ -> ()
15520- | Opaque -> add_imported_opaque modname)
15521- ps.ps_flags;
1552215496 if check then check_consistency ps;
1552315497 Hashtbl.add persistent_structures modname (Some ps);
1552415498 ps
@@ -15573,9 +15547,6 @@ let check_pers_struct name =
1557315547 Format.sprintf
1557415548 "%s uses recursive types"
1557515549 name
15576- | Depend_on_unsafe_string_unit (name, _) ->
15577- Printf.sprintf "%s uses -unsafe-string"
15578- name
1557915550 | Missing_module _ -> assert false
1558015551 | Illegal_value_name _ -> assert false
1558115552 in
@@ -16898,9 +16869,6 @@ let imports () =
1689816869 (StringSet.fold
1689916870 (fun m acc -> if m = x then acc else m::acc)
1690016871 !imported_units []) crc_units
16901- (* Returns true if [s] is an opaque imported module *)
16902- let is_imported_opaque s =
16903- StringSet.mem s !imported_opaque_units
1690416872
1690516873(* Save a signature to a file *)
1690616874
@@ -17093,11 +17061,6 @@ let report_error ppf = function
1709317061 fprintf ppf
1709417062 "@[<hov>Unit %s imports from %s, which uses recursive types.@ %s@]"
1709517063 export import "The compilation flag -rectypes is required"
17096- | Depend_on_unsafe_string_unit(import, export) ->
17097- fprintf ppf
17098- "@[<hov>Unit %s imports from %s, compiled with -unsafe-string.@ %s@]"
17099- export import "This compiler has been configured in strict \
17100- safe-string mode (-force-safe-string)"
1710117064 | Missing_module(_, path1, path2) ->
1710217065 fprintf ppf "@[@[<hov>";
1710317066 if Path.same path1 path2 then
@@ -267714,11 +267677,6 @@ let report_error ppf = function
267714267677 fprintf ppf
267715267678 "@[<hov>Unit %s imports from %s, which uses recursive types.@ %s@]"
267716267679 export import "The compilation flag -rectypes is required"
267717- | Depend_on_unsafe_string_unit(import, export) ->
267718- fprintf ppf
267719- "@[<hov>Unit %s imports from %s, compiled with -unsafe-string.@ %s@]"
267720- export import "This compiler has been configured in strict \
267721- safe-string mode (-force-safe-string)"
267722267680 | Missing_module(_, path1, path2) ->
267723267681 fprintf ppf "@[@[<hov>";
267724267682 if Path.same path1 path2 then
0 commit comments