Module Ppxlib.Reserved_namespaces

Small module to reserve namespaces in attribute names.

val reserve : string -> unit

reserve "foo" has two implications:

  • one can't then declare an attribute inside this namespace
  • attributes within this namespace won't be reported by check_unused

This is here to insure that the rewriter cohabits well with other rewriter or tools (e.g. merlin) which might leave attribute on the AST.

N.B. the following namespaces are reserved by default: merlin, reason, refmt ns, res, metaocaml, ocamlformat and ppxlib.

val is_in_reserved_namespaces : string -> bool