diff --git a/lib/Normalize_std_ast.ml b/lib/Normalize_std_ast.ml index e6196b9dad..58679f9a23 100644 --- a/lib/Normalize_std_ast.ml +++ b/lib/Normalize_std_ast.ml @@ -12,6 +12,22 @@ open Parser_standard open Std_ast +(* CR jane-syntax: Soon we will import the PR eliminating the rest of the + attribute-based jane syntax mechanism + (https://github.com/ocaml-flambda/flambda-backend/pull/3162), and the + person who does that will have some work to do in this file. + + Currently, this file doesn't explicitly handle much of what remains in + jane syntax (e.g., immutable arrays and module strengthening). But it is + surprising that it doesn't - it must be the case that these features are + undertested or the obvious normalization problems they create when erasing + jane syntax are masked by the broken round-trip check. + + To fix that, it will likely be necessary to add explicit normalization + logic for the remaining jane street extensions to this file. At the same + time, [is_erasable_jane_syntax] below, which is currently just handling + [curry] attributes, should probably be inlined or renamed. *) + let is_doc = function | {attr_name= {Location.txt= "ocaml.doc" | "ocaml.text"; _}; _} -> true | _ -> false diff --git a/vendor/parser-extended/parse.ml b/vendor/parser-extended/parse.ml index 6d12f05af9..164a17757f 100644 --- a/vendor/parser-extended/parse.ml +++ b/vendor/parser-extended/parse.ml @@ -175,7 +175,7 @@ let prepare_error err = | Constrained_types -> Format.fprintf ppf "constrained types are not supported" | Private_types -> - Format.fprintf ppf "private types are not supported" + Format.fprintf ppf "private types are not supported" | Not_with_type -> Format.fprintf ppf "only %s constraints are supported" "with type t =" diff --git a/vendor/parser-jane/README.md b/vendor/parser-jane/README.md index b26ded21db..d51196646d 100644 --- a/vendor/parser-jane/README.md +++ b/vendor/parser-jane/README.md @@ -13,7 +13,14 @@ Just run: ./parser-jane/repatch.sh {path-to-flambda-backend} ``` Additional steps may be necessary if you are adding or removing files - see the -top-level HACKING.jst.md +top-level HACKING.jst.md. + +Note: The import script tries to apply a patch to the newly imported parser that +restores the changes needed by ocamlformat. This diff may fail to apply cleanly, +for example if the same parts of the parser have changed in flambda-backend. +In that case, you will see in the script's output that some parts of the patch +haven't been applied and it will create ".rej" files describing them. You must +manually look at and apply these rejected portions. ### Manually