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