Runtime_events.User(3)
π Runtime_events.User(3) π
okay so this one's straight out of the OCaml library manual, and honestly? it's giving "tiny module, big main-character energy" β¨
β¨ NAME β¨
Runtime_events.User β no description π (yes bestie, that's literally what it says, we're not making it up)
π¦ Module π¦
Module Runtime_events.User
πΈ Documentation πΈ
Module User
: sig end
π the whole vibe π
So User events are literally a way for libraries to serve up runtime events that other tools can then consume β like handing your bestie the aux cord π§ These events can carry known data types or custom values, whichever fits. And heads up: the current maximum number of user events is 8192. That's the ceiling, no cap. π₯
type tag = ..
The type for a user event tag β tags are how you discriminate between user events of the same type. iykyk π·οΈ
type 'value t
The type for a user event. A user event describes its tag, its carried data type, and a unique string-based name. it's giving full ID card, honestly πͺͺ
π the functions π
val register : string -> tag -> 'value Runtime_events.Type.t -> 'value tβregister name tag tyregisters a brand-new event with a uniquename, carrying atagand values of typety. one name, one event, no duplicates periodt πval write : 'value t -> 'value -> unitβwrite t vemits valuevfor eventt. simple as that, she just writes ποΈβ¨val name : 'a t -> stringβname tis the unique identifying name of eventt. it's the event's government name fr fr π«Άval tag : 'a t -> tagβtag tis the associated tag of eventt, when it is known. and like, an event can be unknown if it was not registered in the consumer program π so don't come for her if she doesn't know her own tag, it's not a personal thing π
π«Ά little recap for the group chat:tagdiscriminates,tdescribes (tag + data type + unique string name),registermakes new ones,writeemits,nametells you the name,tagtells you the tag if it's known. and the max is8192. slay. π
byeeee bestie π¦ this page was served to you by OCamldoc, dated 2026-06-22, and yes it's still Runtime_events.User(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