Stdlib.Effect(3)

🌸 NAME 🌸

okay so bestie, this is the Stdlib.Effect(3) page from the OCaml library, and the name section is literally giving:

Stdlib.Effect β€” no description 😭

like, that's it. no extra lore. the manpage said β€œno description” and we respect the icon's privacy πŸ’…βœ¨


🧚 MODULE 🧚

the module is Stdlib.Effect, and it shows up here as:

Module Effect
 : (module Stdlib__Effect)

slay, that's the whole module vibe check 🫢


πŸ“š DOCUMENTATION πŸ“š

⚠️ Alert unstable. The Effect interface may change in incompatible ways in the future.

so like, bestie, don't get too attached to the exact shape β€” this interface may change in incompatible ways in the future πŸ˜­πŸ’€. it's giving β€œcute but under construction.”

the type is literally:

type 'a t = 'a eff = ..

This is the type of effects. that's the whole description, and honestly? iconic. ✨


πŸ’– Exceptions πŸ’–

  • exception Unhandled : 'a t -> exn β€” Unhandled e is raised when effect e is performed and there is no handler for it. so if you perform e and nobody's home to handle it, boom: Unhandled e. rude but valid πŸ™ˆ
  • exception Continuation_already_resumed β€” this exception is raised when a continuation is continued or discontinued more than once. no double-dipping, bestie β€” continued or discontinued more than once and it's over for you πŸ’€

πŸ¦‹ perform πŸ¦‹

val perform : 'a t -> 'a

perform e performs an effect e. that's the move. πŸŽ€

it raises Unhandled if there is no handler for e β€” so yeah, if there's no handler for e, Unhandled is coming for you, fr fr 😭


🌈 Modules 🌈

  • module Deep : sig end β€” the full signature shown here is literally just sig end. that's the whole thing. no cap. ✨
  • module Shallow : sig end β€” same deal: the signature shown is just sig end. short and mysterious, main character energy πŸ‘‘

byeeee πŸ’‹ this page was served by OCamldoc, dated 2026-06-22, for Stdlib.Effect(3). mwah πŸ«ΆπŸ’–

πŸ“¦ where this page comes from