Skip to content

Allow unboxed floats (+ annotations + any) in -extension layouts #2003

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 5 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion ocaml/boot/menhir/parser.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ let unboxed_float sloc sign (f, m) =

let assert_unboxed_float_type ~loc =
Language_extension.(
Jane_syntax_parsing.assert_extension_enabled ~loc Layouts Beta)
Jane_syntax_parsing.assert_extension_enabled ~loc Layouts Stable)

let unboxed_float_type sloc tys =
assert_unboxed_float_type ~loc:(make_loc sloc);
Expand Down
4 changes: 2 additions & 2 deletions ocaml/parsing/builtin_attributes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,9 @@ let jkind ~legacy_immediate attrs =
| Value -> check true
| Immediate | Immediate64 ->
check (legacy_immediate
|| Language_extension.(is_at_least Layouts Beta))
|| Language_extension.(is_at_least Layouts Stable))
| Any | Float64 ->
check Language_extension.(is_at_least Layouts Beta)
check Language_extension.(is_at_least Layouts Stable)
| Void ->
check Language_extension.(is_at_least Layouts Alpha)

Expand Down
2 changes: 1 addition & 1 deletion ocaml/parsing/parser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ let unboxed_float sloc sign (f, m) =

let assert_unboxed_float_type ~loc =
Language_extension.(
Jane_syntax_parsing.assert_extension_enabled ~loc Layouts Beta)
Jane_syntax_parsing.assert_extension_enabled ~loc Layouts Stable)

let unboxed_float_type sloc tys =
assert_unboxed_float_type ~loc:(make_loc sloc);
Expand Down
Loading