CamlinternalM...MENTAL_ENGINE(3)
β¨ NAME β¨
okay so the official NAME bit is literally no description π β that's the whole tea. This is CamlinternalM...MENTAL_ENGINE(3) from the OCaml library, and yes bestie, we're folding that manual-name info right up here instead of making you squint at a dusty header line. It's a module type page, and the full docs are down below with zero skips, zero crumbs, periodt π
π§© Module type π§©
Module type CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE
π Documentation π
The module type itself is exactly this:
Module type INCREMENTAL_ENGINE
= sig end
Then comes the full signature roll call. The original manpage gives no individual descriptions for these types and vals, so I'm not inventing lore β every declaration is here exactly as listed, with all the long CamlinternalMenhirLib.IncrementalEngine.position paths intact π«Άβ¨
The type lineup, main-character edition:
type token
type production
type 'a env
type 'a checkpoint = private
| InputNeeded of 'a env
| Shifting of 'a env * 'a env * bool
| AboutToReduce of 'a env * production
| HandlingError of 'a env
| Accepted of 'a
| Rejected
The offer + strategy chunk:
val offer : 'a checkpoint -> token *
CamlinternalMenhirLib.IncrementalEngine.position *
CamlinternalMenhirLib.IncrementalEngine.position -> 'a checkpoint
type strategy = [ `Legacy | `Simplified ]
val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
Supplier and looping crew:
type supplier = unit -> token *
CamlinternalMenhirLib.IncrementalEngine.position *
CamlinternalMenhirLib.IncrementalEngine.position
val lexer_lexbuf_to_supplier : (Lexing.lexbuf -> token) -> Lexing.lexbuf
-> supplier
val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
val loop_handle : ('a -> 'answer) -> ('a checkpoint -> 'answer) ->
supplier -> 'a checkpoint -> 'answer
val loop_handle_undo : ('a -> 'answer) -> ('a checkpoint -> 'a
checkpoint -> 'answer) -> supplier -> 'a checkpoint -> 'answer
Checkpoint checks and lr1state bits:
val shifts : 'a checkpoint -> 'a env option
val acceptable : 'a checkpoint -> token ->
CamlinternalMenhirLib.IncrementalEngine.position -> bool
type 'a lr1state
val number : 'a lr1state -> int
val production_index : production -> int
val find_production : int -> production
Element and stack land:
type element =
| Element : 'a lr1state * 'a *
CamlinternalMenhirLib.IncrementalEngine.position *
CamlinternalMenhirLib.IncrementalEngine.position -> element
type stack = element CamlinternalMenhirLib.General.stream
val stack : 'a env -> stack
val top : 'a env -> element option
val pop_many : int -> 'a env -> 'a env option
val get : int -> 'a env -> element option
val current_state_number : 'a env -> int
val equal : 'a env -> 'a env -> bool
val positions : 'a env ->
CamlinternalMenhirLib.IncrementalEngine.position *
CamlinternalMenhirLib.IncrementalEngine.position
Default reductions and the final moves:
val env_has_default_reduction : 'a env -> bool
val state_has_default_reduction : 'a lr1state -> bool
val pop : 'a env -> 'a env option
val force_reduction : production -> 'a env -> 'a env
val input_needed : 'a env -> 'a checkpoint
cute little sign-off bestie: this page came from OCamldoc, dated 2026-06-22, and the manual page is CamlinternalM...MENTAL_ENGINE(3) β mwah πβ¨
π¦ 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