Stdlib.Callback(3) OCaml library Stdlib.Callback(3)

# [NAME](#NAME)

Stdlib.Callback - no description

# [Module](#Module)

Module Stdlib.Callback

# [Documentation](#Documentation)

Module **Callback**  
: **(module Stdlib\_\_Callback)**

*val register* : **string -&gt; 'a -&gt; unit**

**Callback.register n v** registers the value **v** under the name **n** . C code can later retrieve a handle to **v** by calling [**caml\_named\_value(n)**](/man/os/ocaml/caml_named_value.n) .

*val register\_exception* : **string -&gt; exn -&gt; unit**

**Callback.register\_exception n exn** registers the exception contained in the exception value **exn** under the name **n** . C code can later retrieve a handle to the exception by calling [**caml\_named\_value(n)**](/man/os/ocaml/caml_named_value.n) . The exception value thus obtained is suitable for passing as first argument to **raise\_constant** or **raise\_with\_arg** .

2026-09-04 OCamldoc

---

Document: Stdlib.Callback(3o) from ocaml 5.5.1-r0 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
