Syntaxerr(3) OCaml library Syntaxerr(3)

# [NAME](#NAME)

Syntaxerr - Auxiliary type for reporting syntax errors

# [Module](#Module)

Module Syntaxerr

# [Documentation](#Documentation)

Module **Syntaxerr**  
: **sig end**

Auxiliary type for reporting syntax errors

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

*type invalid\_package\_type* =  
| Parameterized\_types  
| Constrained\_types  
| Private\_types  
| Not\_with\_type  
| Neither\_identifier\_nor\_with\_type

*type error* =  
| Unclosed **of** **Location.t * string * Location.t * string**  
| Expecting **of** **Location.t * string**  
| Not\_expecting **of** **Location.t * string**  
| Applicative\_path **of** **Location.t**  
| Variable\_in\_scope **of** **Location.t * string**  
| Other **of** **Location.t**  
| Ill\_formed\_ast **of** **Location.t * string**  
| Invalid\_package\_type **of** **Location.t * invalid\_package\_type**  
| Removed\_string\_set **of** **Location.t**

*exception Error* **of** **error**

*exception Escape\_error*

*val location\_of\_error* : **error -&gt; Location.t**

*val ill\_formed\_ast* : **Location.t -&gt; string -&gt; 'a**

2026-09-04 OCamldoc

---

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