Skip to content

Add -as-argument-for parameter #2177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 114 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
80a2978
Add `-as-parameter` option
lukemaurer Aug 16, 2023
65d7cbd
Use `CU.Name.t` for name of .cmi; support import info for parameters
lukemaurer Aug 16, 2023
cf8f9e1
Missed a few changes
lukemaurer Aug 21, 2023
25b63ca
Refactor `Persistent_env` to separate imports from bound names
lukemaurer Aug 23, 2023
d0a1675
Merge branch 'cu-name-is-cmi' into layered-persistent_env
lukemaurer Aug 23, 2023
5cde426
Add `-as-argument-for`
lukemaurer Aug 30, 2023
ef2c16b
Add checks for misuse of `-as-parameter`
lukemaurer Aug 30, 2023
546e73a
Raise error on combination of `-as-parameter` and `-for-pack`
lukemaurer Aug 30, 2023
7f03329
Add test for check for compiling `.ml` of parameter `.mli`
lukemaurer Aug 30, 2023
431d6bb
Add test of check for `-as-parameter` on implementation
lukemaurer Aug 30, 2023
37e88f3
Remove stray debug code
lukemaurer Aug 31, 2023
171ba39
Fix formatting
lukemaurer Aug 31, 2023
3d952f6
Implement `register_parameter_import` and `is_registered_parameter_im…
lukemaurer Aug 31, 2023
73835a0
Code review
lukemaurer Aug 31, 2023
f95b877
Merge branch 'as-parameter' into cu-name-is-cmi
lukemaurer Aug 31, 2023
e2c7976
Merge branch 'cu-name-is-cmi' into layered-persistent_env
lukemaurer Aug 31, 2023
0c87e5c
Merge branch 'layered-persistent_env' into as-argument-for
lukemaurer Aug 31, 2023
cd5ff12
Fix missing change to use of `Env.read_signature`
lukemaurer Sep 13, 2023
c4a43ca
Merge branch 'cu-name-is-cmi' into layered-persistent_env
lukemaurer Sep 13, 2023
68dd87f
Pass shape into `Env` callback
lukemaurer Sep 13, 2023
bc78a1d
Improve API for reading signatures from files
lukemaurer Sep 13, 2023
3875b13
Merge branch 'layered-persistent_env' into as-argument-for
lukemaurer Sep 13, 2023
0283acb
Forgot the code to check .mli files
lukemaurer Sep 20, 2023
61b5aee
Forgot the code to access double module blocks correctly
lukemaurer Sep 20, 2023
91ea4aa
Add missing objinfo code
lukemaurer Sep 26, 2023
7b6d875
Pull in `print_global_line` early
lukemaurer Sep 26, 2023
ab62d1d
New library for computing instance names after substitution
lukemaurer Mar 8, 2023
2caadb2
Rename library to `Global`; defunctorize; move test
lukemaurer Mar 16, 2023
9124af4
Merge remote-tracking branch 'upstream/main' into instance-library
lukemaurer Sep 27, 2023
4a5f03d
Hide records behind checked smart constructors
lukemaurer May 11, 2023
e901457
Have `subst` return original record if the result is equal
lukemaurer May 15, 2023
f8587a5
Fix bug introduced by last commit
lukemaurer May 15, 2023
67ad5fe
Merge remote-tracking branch 'upstream/main' into instance-library
lukemaurer Sep 27, 2023
4710f66
Pull in changes from the 'instance-typing' branch
lukemaurer Aug 10, 2023
4b01ef5
Merge remote-tracking branch 'upstream/main' into instance-library
lukemaurer Sep 27, 2023
db4fa04
Make `Global.Name.print` act like `CU.Name.print` in simple cases
lukemaurer Sep 20, 2023
c24e14f
Code review
lukemaurer Sep 29, 2023
4336e64
Merge remote-tracking branch 'upstream/main' into as-parameter
lukemaurer Sep 29, 2023
d530f6b
Add to .cmo format rather than only .cmx format
lukemaurer Oct 4, 2023
8b52f69
Fix error message and re-enable test
lukemaurer Oct 19, 2023
c1ebcbe
Merge branch 'as-parameter' into cu-name-is-cmi
lukemaurer Oct 19, 2023
2dda1ca
Fix compilation following merge
lukemaurer Oct 19, 2023
a3b7a31
Update bootstrap compiler
lukemaurer Oct 19, 2023
fa251ce
Fix upstream build
lukemaurer Oct 19, 2023
6f86fb9
Disable test of error message
lukemaurer Oct 19, 2023
88b6185
Merge branch 'cu-name-is-cmi' into layered-persistent_env
lukemaurer Oct 19, 2023
52ea8fd
Revert "Disable test of error message"
lukemaurer Oct 19, 2023
a9eea0b
Fix upstream build
lukemaurer Oct 19, 2023
4f01e24
Merge branch 'layered-persistent_env' into as-argument-for
lukemaurer Oct 19, 2023
b4ec625
Normalise test specification
lukemaurer Oct 20, 2023
591a4ec
Generate test specifications
lukemaurer Oct 10, 2023
268ebbd
Test native compilation
lukemaurer Oct 10, 2023
c15dcfb
Ability to add extra variables to actions in `gen_test`
lukemaurer Oct 11, 2023
294ad42
Merge remote-tracking branch 'upstream/main' into as-parameter
lukemaurer Nov 16, 2023
5518617
Merge remote-tracking branch 'upstream/main' into as-parameter
lukemaurer Nov 16, 2023
77e4338
Merge branch 'as-parameter' into cu-name-is-cmi
lukemaurer Nov 17, 2023
23adeca
Merge branch 'as-parameter' into cu-name-is-cmi
lukemaurer Nov 17, 2023
9234fcd
Bootstrap
lukemaurer Nov 17, 2023
4b2f192
Merge branch 'cu-name-is-cmi' into layered-persistent_env
lukemaurer Nov 17, 2023
025558c
Remove warning boilerplate from new files
lukemaurer Nov 17, 2023
4c0c8b6
Update `ocaml/.depend`
lukemaurer Nov 17, 2023
f494b9f
Merge branch 'layered-persistent_env' into as-argument-for
lukemaurer Nov 17, 2023
3b8a7f5
Fix a bit of silly back-and-forth
lukemaurer Nov 17, 2023
daaf996
Update tests following rebase
lukemaurer Nov 17, 2023
987a2bd
Partially fix Closure
lukemaurer Nov 17, 2023
4dd61bb
Merge remote-tracking branch 'upstream/main' into as-parameter
lukemaurer Dec 5, 2023
c67a202
Merge remote-tracking branch 'upstream/main' into as-parameter
lukemaurer Dec 8, 2023
4322629
Use unnamed field instead of double module block
lukemaurer Dec 11, 2023
6d22bc4
Store argument block itself rather than coercion function
lukemaurer Dec 12, 2023
398cc90
Bring in squashed merge of 'as-parameter' branch
lukemaurer Dec 12, 2023
9db2c13
Merge branch 'unsquash/as-parameter' into cu-name-is-cmi
lukemaurer Dec 12, 2023
bf51bd8
Merge remote-tracking branch 'upstream/main' into cu-name-is-cmi
lukemaurer Dec 12, 2023
28654cc
Merge remote-tracking branch 'upstream/main' into unsquash/as-parameter
lukemaurer Dec 12, 2023
f1e32a9
Merge branch 'unsquash/as-parameter' into cu-name-is-cmi
lukemaurer Dec 12, 2023
3cb1126
Code review
lukemaurer Dec 18, 2023
e05a7f5
Code review
lukemaurer Dec 19, 2023
b3be73d
Merge branch 'cu-name-is-cmi' into layered-persistent_env
lukemaurer Dec 19, 2023
b07af9b
Merge branch 'layered-persistent_env' into as-argument-for
lukemaurer Dec 19, 2023
a277c51
Bootstrap
lukemaurer Dec 19, 2023
e8abb3a
Remove code gen changes from `-as-argument-for` branch
lukemaurer Dec 22, 2023
7d6f798
Rename `secondary_interface` to `argument_interface`
lukemaurer Feb 20, 2024
ccd7064
Overhaul `Import_info` implementation and new API
lukemaurer Apr 30, 2024
c6f988b
Code review
lukemaurer Apr 30, 2024
91c2329
Bootstrap
lukemaurer Apr 30, 2024
8a2b5c2
Merge branch 'cu-name-is-cmi' into layered-persistent_env
lukemaurer Apr 30, 2024
a3641bb
Compilation fixes following merge
lukemaurer Apr 30, 2024
7e760a1
Copy changes from `asmlink.ml` to `asmlink.ml`
lukemaurer May 1, 2024
014a2d3
Rename a few things for consistency and update comments
lukemaurer May 1, 2024
66fb8b8
Merge branch 'cu-name-is-cmi' into layered-persistent_env
lukemaurer May 1, 2024
447c2dd
Merge remote-tracking branch 'upstream/main' into cu-name-is-cmi
lukemaurer May 1, 2024
f1be371
Merge branch 'layered-persistent_env' into as-argument-for
lukemaurer May 1, 2024
91b0725
Merge branch 'cu-name-is-cmi' into layered-persistent_env
lukemaurer May 1, 2024
d701be1
Code review
lukemaurer May 1, 2024
d4cacae
Re-check visibility on _either_ cache hit
lukemaurer May 1, 2024
efd3020
Merge remote-tracking branch 'upstream/main' into cu-name-is-cmi
lukemaurer May 9, 2024
2adb8bd
Rename a few things for code review
lukemaurer May 15, 2024
381a67c
Merge branch 'cu-name-is-cmi' into layered-persistent_env
lukemaurer May 15, 2024
4ad0aa3
Merge branch 'upstream/main' into layered-persistent_env, up to squas…
lukemaurer May 15, 2024
5af30a5
Bring in squashed merge of 'cu-name-is-cmi' branch
lukemaurer May 15, 2024
f255c62
Merge remote-tracking branch 'upstream/main' into layered-persistent_env
lukemaurer May 15, 2024
9fcab53
Merge branch 'layered-persistent_env' into as-argument-for
lukemaurer May 15, 2024
288ed6c
Remove test spec generator
lukemaurer May 15, 2024
5f5a85b
Merge remote-tracking branch 'upstream/main' into instance-library
lukemaurer May 22, 2024
1159e12
Remove now-unused functions from `Misc`
lukemaurer May 22, 2024
531c90c
Have `Global.subst` return whether the input changed
lukemaurer May 22, 2024
1e681ac
Bring in squashed merge of 'layered-persistent_env' branch
lukemaurer May 23, 2024
9dde77e
Rename `global.ml` to `global_module.ml` and move into `typing/`
lukemaurer May 28, 2024
6272975
Improve error messages
lukemaurer May 29, 2024
70a9aa2
Code review
lukemaurer May 29, 2024
6733ace
Partially merge remote-tracking branch 'upstream/main' into as-argume…
lukemaurer May 30, 2024
a87959b
Merge remote-tracking branch 'upstream/main' into as-argument-for
lukemaurer May 30, 2024
4061e54
Add unsquashed 'instance-library' branch as parent
lukemaurer May 30, 2024
33a0476
Put back inadvertently-removed argument label in `Typemod`
lukemaurer Jun 6, 2024
6e596bf
Don't register the argument type as a parameter import
lukemaurer Jun 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions ocaml/driver/compile_common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ let typecheck_intf info ast =
let tsg =
ast
|> Typemod.type_interface
~sourcefile:info.source_file
info.module_name
info.env
~sourcefile:info.source_file info.module_name info.env
|> print_if info.ppf_dump Clflags.dump_typedtree Printtyped.interface
in
let sg = tsg.Typedtree.sig_type in
Expand All @@ -87,8 +85,14 @@ let emit_signature info ast tsg =
let kind : Cmi_format.kind =
if !Clflags.as_parameter then
Parameter
else
Normal { cmi_impl = info.module_name }
else begin
let cmi_arg_for =
match !Clflags.as_argument_for with
| Some arg_type -> Some (Compilation_unit.Name.of_string arg_type)
| None -> None
in
Normal { cmi_impl = info.module_name; cmi_arg_for }
end
in
let alerts = Builtin_attributes.alerts_of_sig ast in
Env.save_signature ~alerts tsg.Typedtree.sig_type
Expand Down
9 changes: 9 additions & 0 deletions ocaml/driver/main_args.ml
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,11 @@ let mk_as_parameter f =
" Compiles the interface as a parameter for an open module."
;;

let mk_as_argument_for f =
"-as-argument-for", Arg.String f,
"<module name> Compiles the module as an argument for the named parameter."
;;

let mk_use_prims f =
"-use-prims", Arg.String f, "<file> (undocumented)"

Expand Down Expand Up @@ -965,6 +970,7 @@ end
module type Compiler_options = sig
val _a : unit -> unit
val _annot : unit -> unit
val _as_argument_for : string -> unit
val _as_parameter : unit -> unit
val _binannot : unit -> unit
val _binannot_cms : unit -> unit
Expand Down Expand Up @@ -1165,6 +1171,7 @@ struct
mk_absname F._absname;
mk_no_absname F._no_absname;
mk_annot F._annot;
mk_as_argument_for F._as_argument_for;
mk_as_parameter F._as_parameter;
mk_binannot F._binannot;
mk_binannot_cms F._binannot_cms;
Expand Down Expand Up @@ -1383,6 +1390,7 @@ struct
mk_afl_instrument F._afl_instrument;
mk_afl_inst_ratio F._afl_inst_ratio;
mk_annot F._annot;
mk_as_argument_for F._as_argument_for;
mk_as_parameter F._as_parameter;
mk_binannot F._binannot;
mk_binannot_cms F._binannot_cms;
Expand Down Expand Up @@ -1970,6 +1978,7 @@ module Default = struct
let _annot = set annotations
let _args = Arg.read_arg
let _args0 = Arg.read_arg0
let _as_argument_for s = as_argument_for := Some s
let _as_parameter = set as_parameter
let _binannot = set binary_annotations
let _binannot_cms = set binary_annotations_cms
Expand Down
1 change: 1 addition & 0 deletions ocaml/driver/main_args.mli
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ end
module type Compiler_options = sig
val _a : unit -> unit
val _annot : unit -> unit
val _as_argument_for : string -> unit
val _as_parameter : unit -> unit
val _binannot : unit -> unit
val _binannot_cms : unit -> unit
Expand Down
1 change: 1 addition & 0 deletions ocaml/file_formats/cmi_format.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type pers_flags =
type kind =
| Normal of {
cmi_impl : Compilation_unit.t;
cmi_arg_for : Compilation_unit.Name.t option;
}
| Parameter

Expand Down
1 change: 1 addition & 0 deletions ocaml/file_formats/cmi_format.mli
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type pers_flags =
type kind =
| Normal of {
cmi_impl : Compilation_unit.t;
cmi_arg_for : Compilation_unit.Name.t option;
}
| Parameter

Expand Down
4 changes: 3 additions & 1 deletion ocaml/ocamldoc/odoc_analyse.ml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ let process_interface_file sourcefile =
Pparse.file ~tool_name inputfile
(no_docstring Parse.interface) Pparse.Signature
in
let sg = Typemod.type_interface ~sourcefile compilation_unit (initial_env()) ast in
let sg =
Typemod.type_interface ~sourcefile compilation_unit (initial_env()) ast
in
Warnings.check_fatal ();
(ast, sg, inputfile)

Expand Down
4 changes: 4 additions & 0 deletions ocaml/testsuite/tests/templates/basic/bad_arg_impl.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type t = unit

let empty = ()
let append () () = `Banana
12 changes: 12 additions & 0 deletions ocaml/testsuite/tests/templates/basic/bad_arg_impl.reference
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
File "bad_arg_impl.ml", line 1:
Error: The argument module bad_arg_impl.ml
does not match the parameter signature monoid.cmi:
Values do not match:
val append : unit -> unit -> [> `Banana ]
is not included in
val append : t -> t -> t
The type unit -> unit -> [> `Banana ] is not compatible with the type
t -> t -> t
Type [> `Banana ] is not compatible with type t = unit
File "monoid.mli", line 4, characters 0-24: Expected declaration
File "bad_arg_impl.ml", line 4, characters 4-10: Actual declaration
4 changes: 4 additions & 0 deletions ocaml/testsuite/tests/templates/basic/bad_arg_intf.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type t

val empty : t
val append : t -> t -> [ `Banana ]
12 changes: 12 additions & 0 deletions ocaml/testsuite/tests/templates/basic/bad_arg_intf.reference
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
File "bad_arg_intf.mli", line 1:
Error: The argument module bad_arg_intf.mli
does not match the parameter signature monoid.cmi:
Values do not match:
val append : t -> t -> [ `Banana ]
is not included in
val append : t -> t -> t
The type t -> t -> [ `Banana ] is not compatible with the type
t -> t -> t
Type [ `Banana ] is not compatible with type t
File "monoid.mli", line 4, characters 0-24: Expected declaration
File "bad_arg_intf.mli", line 4, characters 0-34: Actual declaration
4 changes: 4 additions & 0 deletions ocaml/testsuite/tests/templates/basic/string_monoid.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type t = string

let empty = ""
let append = (^)
4 changes: 4 additions & 0 deletions ocaml/testsuite/tests/templates/basic/string_monoid.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type t = string

val empty : t
val append : t -> t -> t
145 changes: 134 additions & 11 deletions ocaml/testsuite/tests/templates/basic/test.ml
Original file line number Diff line number Diff line change
@@ -1,13 +1,136 @@
(* TEST
readonly_files = "bad_ref_direct.ml bad_ref_direct.reference monoid.mli ";
setup-ocamlc.byte-build-env;
flags = "-as-parameter";
module = "monoid.mli";
ocamlc.byte;
module = "bad_ref_direct.ml";
compiler_output = "bad_ref_direct.output";
ocamlc_byte_exit_status = "2";
ocamlc.byte;
compiler_reference = "bad_ref_direct.reference";
check-ocamlc.byte-output;
readonly_files = "\
bad_arg_impl.ml bad_arg_impl.reference \
bad_arg_intf.mli bad_arg_intf.reference \
bad_ref_direct.ml bad_ref_direct.reference \
monoid.mli \
string_monoid.ml string_monoid.mli \
test_direct_access.ml test_direct_access.reference \
";

{
setup-ocamlc.byte-build-env;

flags = "-as-parameter";
module = "monoid.mli";
ocamlc.byte;
{
flags = "";
module = "bad_ref_direct.ml";
compiler_output = "bad_ref_direct.output";
ocamlc_byte_exit_status = "2";
ocamlc.byte;

compiler_reference = "bad_ref_direct.reference";
check-ocamlc.byte-output;
}{
flags = "-as-argument-for Monoid";
module = "bad_arg_impl.ml";
compiler_output = "bad_arg_impl.output";
ocamlc_byte_exit_status = "2";
ocamlc.byte;

compiler_reference = "bad_arg_impl.reference";
check-ocamlc.byte-output;
}{
flags = "-as-argument-for Monoid";
module = "bad_arg_intf.mli";
compiler_output = "bad_arg_intf.output";
ocamlc_byte_exit_status = "2";
ocamlc.byte;

compiler_reference = "bad_arg_intf.reference";
check-ocamlc.byte-output;
}{
src = "string_monoid.ml";
dst = "string_monoid_no_mli.ml";
copy;

flags = "-as-argument-for Monoid";
module = "string_monoid_no_mli.ml string_monoid.mli string_monoid.ml";
ocamlc.byte;

flags = "";
module = "test_direct_access.ml";
ocamlc.byte;

flags = "";
program = "${test_build_directory}/test_direct_access.bc";
module = "";
all_modules = "\
string_monoid.cmo \
string_monoid_no_mli.cmo \
test_direct_access.cmo \
";
ocamlc.byte;

output = "test_direct_access.output";
run;

reference = "test_direct_access.reference";
check-program-output;
}
}{
setup-ocamlopt.byte-build-env;

flags = "-as-parameter";
module = "monoid.mli";
ocamlopt.byte;
{
flags = "";
module = "bad_ref_direct.ml";
compiler_output = "bad_ref_direct.output";
ocamlopt_byte_exit_status = "2";
ocamlopt.byte;

compiler_reference = "bad_ref_direct.reference";
check-ocamlopt.byte-output;
}{
flags = "-as-argument-for Monoid";
module = "bad_arg_impl.ml";
compiler_output = "bad_arg_impl.output";
ocamlopt_byte_exit_status = "2";
ocamlopt.byte;

compiler_reference = "bad_arg_impl.reference";
check-ocamlopt.byte-output;
}{
flags = "-as-argument-for Monoid";
module = "bad_arg_intf.mli";
compiler_output = "bad_arg_intf.output";
ocamlopt_byte_exit_status = "2";
ocamlopt.byte;

compiler_reference = "bad_arg_intf.reference";
check-ocamlopt.byte-output;
}{
src = "string_monoid.ml";
dst = "string_monoid_no_mli.ml";
copy;

flags = "-as-argument-for Monoid";
module = "string_monoid_no_mli.ml string_monoid.mli string_monoid.ml";
ocamlopt.byte;

flags = "";
module = "test_direct_access.ml";
ocamlopt.byte;

flags = "";
program = "${test_build_directory}/test_direct_access.exe";
module = "";
all_modules = "\
string_monoid.cmx \
string_monoid_no_mli.cmx \
test_direct_access.cmx \
";
ocamlopt.byte;

output = "test_direct_access.output";
run;

reference = "test_direct_access.reference";
check-program-output;
}
}
*)
5 changes: 5 additions & 0 deletions ocaml/testsuite/tests/templates/basic/test_direct_access.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
let () =
let open Printf in
printf "With .mli: %s\n" (String_monoid.append "Hello " "world!");
printf "Without .mli: %s\n" (String_monoid_no_mli.append "Hello " "world!");
()
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
With .mli: Hello world!
Without .mli: Hello world!
8 changes: 7 additions & 1 deletion ocaml/typing/env.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,10 @@ let register_import_as_opaque modname =
Persistent_env.register_import_as_opaque !persistent_env modname

let is_parameter_unit modname =
Persistent_env.is_registered_parameter_import !persistent_env modname
Persistent_env.is_parameter_import !persistent_env modname

let implemented_parameter modname =
Persistent_env.implemented_parameter !persistent_env modname

let reset_declaration_caches () =
Types.Uid.Tbl.clear !value_declarations;
Expand Down Expand Up @@ -2639,6 +2642,9 @@ let read_signature modname filename ~add_binding =
let mty = read_pers_mod modname filename ~add_binding in
Subst.Lazy.force_signature mty

let register_parameter_import import =
Persistent_env.register_parameter_import !persistent_env import

let is_identchar_latin1 = function
| 'A'..'Z' | 'a'..'z' | '_' | '\192'..'\214' | '\216'..'\246'
| '\248'..'\255' | '\'' | '0'..'9' -> true
Expand Down
8 changes: 8 additions & 0 deletions ocaml/typing/env.mli
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ val save_signature_with_imports:
(* Arguments: signature, module name, module kind,
file name, imported units with their CRCs. *)

(* Register a module as a parameter to this unit. *)
val register_parameter_import: Compilation_unit.Name.t -> unit

(* Return the CRC of the interface of the given compilation unit *)
val crc_of_unit: Compilation_unit.Name.t -> Digest.t

Expand All @@ -496,6 +499,11 @@ val register_import_as_opaque: Compilation_unit.Name.t -> unit
-as-parameter *)
val is_parameter_unit: Compilation_unit.Name.t -> bool

(* [implemented_parameter md] is the argument given to -as-argument-for when
[md] was compiled *)
val implemented_parameter:
Compilation_unit.Name.t -> Compilation_unit.Name.t option

(* Summaries -- compact representation of an environment, to be
exported in debugging information. *)

Expand Down
Loading
Loading