From 48773d67687c2271d8bcac2674a52ff8a2872822 Mon Sep 17 00:00:00 2001 From: Sonja Heinze Date: Mon, 30 May 2022 19:53:37 +0200 Subject: [PATCH] Allow toplevel_printer attributes 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 --- CHANGES.md | 2 ++ src/name.ml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 1e6bfe85b..c9e708626 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,8 @@ unreleased - Fix quoter and optimize identifier quoting (#327, @sim642) +- Driver, when run with `--check`: Allow `toplevel_printer` attributes (#340, @pitag-ha) + 0.26.0 (21/03/2022) ------------------- diff --git a/src/name.ml b/src/name.ml index e5ee63744..2a9008476 100644 --- a/src/name.ml +++ b/src/name.ml @@ -92,6 +92,8 @@ module Whitelisted = struct "ocaml.warn_on_literal_pattern"; "ocaml.warnerror"; "ocaml.warning"; + "ocaml.toplevel_printer" (*Interpreted by the toplevel/utop*); + "toplevel_printer" (*Interpreted by the toplevel/utop*); ] (* White list the following extensions.