Docstrings.WithMenhir(3)
π NAME
Okay so bestie, Docstrings.WithMenhir β and the manpage literally says no description. That's it. That's the whole name section. Iconic of it to give us nothing, honestly. π«
π¦ Module
The module is called Docstrings.WithMenhir β that's the one we're talking about the whole way through, mwah. π
β¨ Documentation β¨
Module WithMenhir
So this is a signature block β : sig end β and inside it there's a whole lil squad of vals. Here they all are, in order, no cap:
val symbol_docs : Lexing.position * Lexing.position -> Docstrings.docs
Grabs the item documentation for the symbol you're currently on. Bonus: it also marks that doc (for ambiguity warnings). Two birds, one slay. π¦β¨
val symbol_docs_lazy : Lexing.position * Lexing.position -> Docstrings.docs Lazy.t
Same shape as symbol_docs, but lazy β the manpage doesn't give it its own description, so we're not out here inventing lore. π
val rhs_docs : Lexing.position -> Lexing.position -> Docstrings.docs
Gives you the item documentation for the symbols sitting between two positions. And yeah β it marks that documentation too (ambiguity warnings, you know the drill). π
val rhs_docs_lazy : Lexing.position -> Lexing.position -> Docstrings.docs Lazy.t
The lazy twin of rhs_docs. No description attached, so no guessing from me. π
val mark_symbol_docs : Lexing.position * Lexing.position -> unit
Just marks the item documentation for the current symbol β for ambiguity warnings. Returns unit, so it's a vibe, not a value. π«Ά
val mark_rhs_docs : Lexing.position -> Lexing.position -> unit
Marks the item documentation for the symbols between two positions as associated (for ambiguity warnings). π·οΈ
val symbol_info : Lexing.position -> Docstrings.info
Fetches the field info for the current symbol. Info era. β
val rhs_info : Lexing.position -> Docstrings.info
Fetches the field info following the symbol at a given position. Following, not preceding β read it carefully bestie. π
val symbol_text : Lexing.position -> Docstrings.text
Fetches the text preceding the current symbol. Pre, not post. πΈ
val symbol_text_lazy : Lexing.position -> Docstrings.text Lazy.t
Lazy version of symbol_text. No description given β moving on, our hands are clean. π§
val rhs_text : Lexing.position -> Docstrings.text
Fetches the text preceding the symbol at the given position. Same energy, position-flavoured. π
val rhs_text_lazy : Lexing.position -> Docstrings.text Lazy.t
And the lazy one. Again β no description. We respect the mystery. π
π Extra text π
Lowkey the cutest part. There might be additional text attached to the delimiters of a block (think struct and end β yes, exactly like those). These next functions fetch it, and here's the important bit: they're applied to the contents of the block, not the delimiters themselves. Big distinction, don't fumble it. β¨
val symbol_pre_extra_text : Lexing.position -> Docstrings.text
Fetches additional text preceding the current symbol. π¦
val symbol_post_extra_text : Lexing.position -> Docstrings.text
Fetches additional text following the current symbol. π¦
val rhs_pre_extra_text : Lexing.position -> Docstrings.text
Fetches additional text preceding the symbol at the given position. π
val rhs_post_extra_text : Lexing.position -> Docstrings.text
Fetches additional text following the symbol at the given position. π
val rhs_post_text : Lexing.position -> Docstrings.text
Fetches text following the symbol at the given position. Note this one's just rhs_post_text β no extra in the name, don't come for me, that's literally what it says. π π₯
π Reminder bestie:symbol_pre_extra_text/symbol_post_extra_text/rhs_pre_extra_text/rhs_post_extra_text/rhs_post_textare all about the contents of the block, not the delimiters. Say it with me. π
That's the whole page, fr fr. Generated with OCamldoc, dated 2026-06-22, and that's Docstrings.WithMenhir(3) signing off β section 3 of the manual, mwah, bye bestie! πππ¦
π¦ 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