Skip to content

Conversation

@NathanReb
Copy link
Collaborator

This is imports upstream patches ocaml/ocaml#13604 and ocaml/ocaml#14279 that were done post 5.2 and improve pprintast's handling of raw identifiers.

It should fix the issue that fstar folks ran into with the 0.36.2 release, see the original discussion: ocaml/opam-repository#28610 (comment).

CC @mtzguido @mtelvers

@NathanReb NathanReb force-pushed the patch-pprintast-raw-ids branch from 0b8d1e5 to 9b1bfb5 Compare October 8, 2025 08:27
@NathanReb
Copy link
Collaborator Author

cc @Octachron let me know if I missed something here!

@NathanReb NathanReb force-pushed the patch-pprintast-raw-ids branch from 9b1bfb5 to 1fa115a Compare October 8, 2025 08:29
This imports upstream patches to pprintast that were done post
5.2 and improves pprintast's handling of raw identifiers.
Hopefully that should fix the issue that fstar folks ran into
with the 0.36.2 release.

Signed-off-by: Nathan Rebours <[email protected]>
@NathanReb NathanReb force-pushed the patch-pprintast-raw-ids branch from 1fa115a to a91114f Compare October 8, 2025 13:54
@NathanReb NathanReb changed the title Fix pprintast with Fix pprintast handling of raw identifiers Oct 8, 2025
@NathanReb NathanReb merged commit 96cd560 into ocaml-ppx:main Oct 9, 2025
7 of 8 checks passed
NathanReb pushed a commit to NathanReb/opam-repository that referenced this pull request Oct 10, 2025
CHANGES:

### 5.4 Support

- Add initial OCaml 5.4 support (ocaml-ppx/ppxlib#570, @patricoferris, @NathanReb)

### Other Changes

- Add `Longident.to/of_compiler` to astlib to simplify maintenance
  of ppx-es that interacts with other parts of the compiler-libs such
  as the type checker. (ocaml-ppx/ppxlib#603, @NathanReb)

- Fix a bug where some infix operators such as `mod` would be printed as
  raw identifiers by our `Pprintast`. (ocaml-ppx/ppxlib#601, @NathanReb)

- Fix 5.2 -> 5.3 migration of constants. Those used to always have a `none`
  location which can lead to unhelpful error messages.
  (ocaml-ppx/ppxlib#569, @NathanReb)

- Add a new context-free rule type that replaces AST nodes that have the registered
  attributes attached to them. (ocaml-ppx/ppxlib#574, @Skepfyr)

- Allow users to derive code from module bindings and module declarations
  (ocaml-ppx/ppxlib#576, @patricoferris)

- Expose `Ppxlib.Location.Error.t = Astlib.Location.Error.t` (ocaml-ppx/ppxlib#593, @ceastlund)

- Add `@@@ppxlib.inline.end`, deprecate `@@@deriving.end`. (ocaml-ppx/ppxlib#594, @ceastlund)

- Clean the AST of any ppxlib migration attributes whenever printing using
  Pretty_print mode and the use_compiler_pp flag. (ocaml-ppx/ppxlib#598, @patricoferris)

- Add custom printer support to `pp_ast` functions via the `?printer` config
  parameter. (ocaml-ppx/ppxlib#526, @pedrobslisboa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants