Skip to content
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

Use CU.Name.t for name of .cmi; support import info for parameters #1753

Merged
merged 40 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 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
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
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
cd5ff12
Fix missing change to use of `Env.read_signature`
lukemaurer Sep 13, 2023
c24e14f
Code review
lukemaurer Sep 29, 2023
4336e64
Merge remote-tracking branch 'upstream/main' into as-parameter
lukemaurer Sep 29, 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
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
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
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
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
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
447c2dd
Merge remote-tracking branch 'upstream/main' into cu-name-is-cmi
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
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
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/main' into as-parameter
  • Loading branch information
lukemaurer committed Sep 29, 2023
commit 4336e64d81a0a833bb97b93631b03b34e7516f01
Binary file modified ocaml/boot/ocamlc
Binary file not shown.
Binary file modified ocaml/boot/ocamllex
Binary file not shown.
9 changes: 9 additions & 0 deletions ocaml/typing/typemod.ml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ type error =
| Unpackable_local_modtype_subst of Path.t
| With_cannot_remove_packed_modtype of Path.t * module_type
| Toplevel_nonvalue of string * sort
| Strengthening_mismatch of Longident.t * Includemod.explanation
| Cannot_implement_parameter of filepath
| Cannot_pack_parameter
| Cannot_compile_implementation_as_parameter
Expand Down Expand Up @@ -3691,6 +3692,14 @@ let report_error ~loc _env = function
Location.errorf ~loc
"@[Top-level module bindings must have layout value, but@ \
%s has layout@ %a.@]" id Sort.format sort
| Strengthening_mismatch(lid, explanation) ->
let main = Includemod_errorprinter.err_msgs explanation in
Location.errorf ~loc
"@[<v>\
@[In this strengthened module type, the type of %a@ \
does not match the underlying type@]@ \
%t@]"
longident lid main
| Cannot_implement_parameter path ->
Location.errorf ~loc
"@[Interface %s@ found for this unit is flagged as a parameter.@ \
Expand Down
1 change: 1 addition & 0 deletions ocaml/typing/typemod.mli
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ type error =
| Unpackable_local_modtype_subst of Path.t
| With_cannot_remove_packed_modtype of Path.t * module_type
| Toplevel_nonvalue of string * sort
| Strengthening_mismatch of Longident.t * Includemod.explanation
| Cannot_implement_parameter of Misc.filepath
| Cannot_pack_parameter
| Cannot_compile_implementation_as_parameter
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.