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

Allow forceful crossing of portability and contention #2725

Merged
merged 23 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8ce8a8c
Add basic tests
liam923 Jun 12, 2024
14c1779
Add -allow-illegal-crossing flag
liam923 Jun 12, 2024
1ade74b
Implement for records, variants, and private types, and update tests
liam923 Jun 13, 2024
85edbe9
Fix bug causing types to always cross
liam923 Jun 13, 2024
7b032ee
Add more tests
liam923 Jun 13, 2024
12aa5b2
Fix types with abbrev and manifest
liam923 Jun 14, 2024
af778c2
Remove comment about module signatures
liam923 Jul 3, 2024
ee5f4f4
Add more tests for illegal crossing in signatures
liam923 Jul 3, 2024
dad320e
Add tests demonstrating that values can't cross illegally
liam923 Jul 3, 2024
9f5efa4
Remove no-op annotations
liam923 Jul 3, 2024
be97e77
Treat private types as non-nominative
liam923 Jul 3, 2024
d2a6193
Print annotations when there is illegal crossing
liam923 Jul 3, 2024
eb7fc15
Remove incorrect test
liam923 Jul 5, 2024
6c9b91c
Add test demonstrating incorrect inference for type parameter
liam923 Jul 8, 2024
8fbd36e
Fix test numbering
liam923 Jul 9, 2024
ca5c53d
Fix inference test
liam923 Jul 9, 2024
490a292
Add cr to remove type_has_illegal_crossings
liam923 Jul 9, 2024
0b0868f
Update note about printing jkinds
liam923 Jul 9, 2024
e281a27
Add comment for printing case C1.3
liam923 Jul 9, 2024
9ab2f9a
Fixed incorrect type_has_illegal_crossings value
liam923 Jul 9, 2024
06fdf35
Fix test for inferring 'a
liam923 Jul 9, 2024
06134cb
Rename allow-illegal-crossing.ml to allow_illegal_crossing.ml
liam923 Jul 9, 2024
12471c7
Add tests for mode crossing
liam923 Jul 9, 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
11 changes: 11 additions & 0 deletions ocaml/driver/main_args.ml
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,10 @@ in
\ allows a set of extensions, and every successive universe includes \n\
\ the previous one."

let mk_allow_illegal_crossing f =
"-allow-illegal-crossing", Arg.Unit f,
"Type declarations will not be checked along the portability or contention axes"

let mk_dump_dir f =
"-dump-dir", Arg.String f,
"<dir> dump output like -dlambda into <dir>/<target>.dump"
Expand Down Expand Up @@ -915,6 +919,7 @@ module type Common_options = sig
val _extension : string -> unit
val _no_extension : string -> unit
val _extension_universe : string -> unit
val _allow_illegal_crossing : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
Expand Down Expand Up @@ -1195,6 +1200,7 @@ struct
mk_extension F._extension;
mk_no_extension F._no_extension;
mk_extension_universe F._extension_universe;
mk_allow_illegal_crossing F._allow_illegal_crossing;
mk_for_pack_byt F._for_pack;
mk_g_byt F._g;
mk_no_g F._no_g;
Expand Down Expand Up @@ -1321,6 +1327,7 @@ struct
mk_extension F._extension;
mk_no_extension F._no_extension;
mk_extension_universe F._extension_universe;
mk_allow_illegal_crossing F._allow_illegal_crossing;
mk_noassert F._noassert;
mk_noinit F._noinit;
mk_nolabels F._nolabels;
Expand Down Expand Up @@ -1414,6 +1421,7 @@ struct
mk_extension F._extension;
mk_no_extension F._no_extension;
mk_extension_universe F._extension_universe;
mk_allow_illegal_crossing F._allow_illegal_crossing;
mk_for_pack_opt F._for_pack;
mk_g_opt F._g;
mk_no_g F._no_g;
Expand Down Expand Up @@ -1599,6 +1607,7 @@ module Make_opttop_options (F : Opttop_options) = struct
mk_extension F._extension;
mk_no_extension F._no_extension;
mk_extension_universe F._extension_universe;
mk_allow_illegal_crossing F._allow_illegal_crossing;
mk_no_float_const_prop F._no_float_const_prop;
mk_noassert F._noassert;
mk_noinit F._noinit;
Expand Down Expand Up @@ -1706,6 +1715,7 @@ struct
mk_extension F._extension;
mk_no_extension F._no_extension;
mk_extension_universe F._extension_universe;
mk_allow_illegal_crossing F._allow_illegal_crossing;
mk_noassert F._noassert;
mk_nolabels F._nolabels;
mk_nostdlib F._nostdlib;
Expand Down Expand Up @@ -1817,6 +1827,7 @@ module Default = struct
let _no_extension s = Language_extension.(disable_of_string_exn s)
let _extension_universe s =
Language_extension.(set_universe_and_enable_all_of_string_exn s)
let _allow_illegal_crossing = set Clflags.allow_illegal_crossing
let _noassert = set noassert
let _nolabels = set classic
let _nostdlib = set no_std_include
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 @@ -34,6 +34,7 @@ module type Common_options = sig
val _extension : string -> unit
val _no_extension : string -> unit
val _extension_universe : string -> unit
val _allow_illegal_crossing : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
Expand Down
Loading
Loading