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 toplevel_printer attributes #340

Merged

Conversation

pitag-ha
Copy link
Member

The toplevel_printer attributes are interpreted by the toplevel/utop (see ocaml-community/utop#269). This commit makes sure that the ppxlib driver doesn't complain when encountering them while running with attribute checks enabled.

Btw, we should rename the Whitelisted module to a less discriminatory name. If anyone has an idea for a better name, let me know (or, simply change it!).

The toplevel_printer attributes are interpreted by the toplevel/utop.
This commit makes sure that the ppxlib driver doesn't complain when
encountering them while running with attribute checks enabled.

Signed-off-by: Sonja Heinze <sonjaleaheinze@gmail.com>
@pitag-ha pitag-ha force-pushed the allow-toplevel-printer-attributes branch from d210120 to 48773d6 Compare May 30, 2022 18:02
Copy link
Collaborator

@panglesd panglesd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@pitag-ha pitag-ha merged commit 9e7d4b2 into ocaml-ppx:main Jun 2, 2022
@pitag-ha pitag-ha deleted the allow-toplevel-printer-attributes branch June 2, 2022 16:31
pitag-ha added a commit to pitag-ha/opam-repository that referenced this pull request Jun 14, 2022
CHANGES:

- Update expansion context to leave out value name when multiple are
  defined at once. (ocaml-ppx/ppxlib#351, @ceastlund)

- Add support for OCaml 5.0 (ocaml-ppx/ppxlib#348, @pitag-ha)

- Add `Code_path.enclosing_value` (ocaml-ppx/ppxlib#349, @ceastlund)

- Add `Code_path.enclosing_module` (ocaml-ppx/ppxlib#346, @ceastlund)

- Expand code generated by `~enclose_intf` and `~enclose_impl` (ocaml-ppx/ppxlib#345, @ceastlund)

- Add type annotations to code generated by metaquot (ocaml-ppx/ppxlib#344, @ceastlund)

- Fix typo in description field of dune-project (ocaml-ppx/ppxlib#343, @ceastlund)

- Fix Ast_pattern.many (ocaml-ppx/ppxlib#333, @nojb)

- Fix quoter and optimize identifier quoting (ocaml-ppx/ppxlib#327, @sim642)

- Driver, when run with `--check`: Allow `toplevel_printer` attributes (ocaml-ppx/ppxlib#340, @pitag-ha)

- Documentation: Add a section on reporting errors by embedding extension nodes
  in the AST (ocaml-ppx/ppxlib#318, @panglesd)

- Driver: In the case of ppxlib internal errors, embed those errors instead of
  raising to return a meaningful AST (ocaml-ppx/ppxlib#329, @panglesd)

- API: For each function that could raise a located error, add a function that
  return a `result` instead (ocaml-ppx/ppxlib#329, @panglesd)
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