Syntaxerr(3)
hey bestie, welcome to the Syntaxerr(3) page from the OCaml library β and yes, we're about to make syntax-error reporting make sense π
β¨
π NAME π
Syntaxerr β auxiliary type for reporting syntax errors. π
π§© Module π§©
Module Syntaxerr
π Documentation π
Module Syntaxerr : sig end
Auxiliary type for reporting syntax errors β¨
Warning, bestie: this module is unstable and part of Compiler_libs. π¨
Okay so here's the whole signature, and we are not skipping a single type, constructor, exception, or val β periodt π«Ά
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 -> Location.t
val ill_formed_ast : Location.t -> string -> 'a
Like, that's the whole module vibe right there: one invalid_package_type type, one error type with all its constructors, the Error exception, the Escape_error exception, and those two very important values β location_of_error and ill_formed_ast πΈπ¦
mwah π that's the page, no cap. rendered by OCamldoc on 2026-06-22 for Syntaxerr(3) β iconic behavior only ππ
π¦ where this page comes from
- arch rolling: ocaml 5.5.0-1 Β· LGPL2.1 AND custom: QPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms