Attr\_helper(3) OCaml library Attr\_helper(3)

# [NAME](#NAME)

Attr\_helper - Helpers for attributes

# [Module](#Module)

Module Attr\_helper

# [Documentation](#Documentation)

Module **Attr\_helper**  
: **sig end**

Helpers for attributes

Warning: this module is unstable and part of **Compiler\_libs** .

*type error* =  
| Multiple\_attributes **of** **string**  
| No\_payload\_expected **of** **string**

*val get\_no\_payload\_attribute* : **string -&gt; Parsetree.attributes -&gt; string Asttypes.loc option**

The **string** argument of the following functions is the name of the attribute we are looking for. If the argument is **"foo"** , these functions will find attributes with the name **"foo"** or **"ocaml.foo"**

*val has\_no\_payload\_attribute* : **string -&gt; Parsetree.attributes -&gt; bool**

*exception Error* **of** **Location.t * error**

*val report\_error* : **error Format\_doc.format\_printer**

*val report\_error\_doc* : **error Format\_doc.printer**

2026-10-01 OCamldoc

---

Document: Attr_helper(3o) from ocaml 5.5.1-r1 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
