Misc.EnvLazy(3)

πŸ“¦ version 4.11.1, in centos-stream 9

πŸ’– Misc.EnvLazy(3) πŸ’–

okay so bestie, this page is from the OCaml library manual, and it's all about Misc.EnvLazy. it's giving "short and mysterious" because the NAME line has exactly zero description. iconic, honestly πŸŽ€.


✨ NAME ✨

Misc.EnvLazy - no description

that's it. that's the name. not me staring at "no description" like it's a cryptic text from the group chat 😭.


πŸ“¦ Module πŸ“¦

Module Misc.EnvLazy

this is the module we're in. slay πŸ’….


πŸ“š Documentation πŸ“š

the docs open with Module EnvLazy and then : sig end. here's the exact shape, no cap:

Module EnvLazy
 : sig end

type ('a, 'b) t

type log

val force : ('a -> 'b) -> ('a, 'b) t -> 'b

val create : 'a -> ('a, 'b) t

val get_arg : ('a, 'b) t -> 'a option

val create_forced : 'b -> ('a, 'b) t

val create_failed : exn -> ('a, 'b) t

val log : unit -> log

val force_logged : log -> ('a -> ('b, 'c) result) -> ('a, ('b, 'c)
result) t -> ('b, 'c) result

val backtrack : log -> unit

so yeah β€” two types (('a, 'b) t and log) and eight values (force, create, get_arg, create_forced, create_failed, log, force_logged, backtrack), all chillin' in EnvLazy. type-wise, force takes ('a -> 'b) and an ('a, 'b) t and gives back 'b; create takes 'a and gives ('a, 'b) t; get_arg takes an ('a, 'b) t and gives 'a option; create_forced takes 'b and gives ('a, 'b) t; create_failed takes an exn and gives ('a, 'b) t; log takes unit and gives log; force_logged takes a log, an ('a -> ('b, 'c) result), and an ('a, ('b, 'c) result) t, and gives ('b, 'c) result; and backtrack takes a log and gives unit. no extra lore on the page, just the signatures, and we respect that 🫢.

okay but fr fr: don't imagine behaviour that isn't written here β€” the page only gives you the declarations, bestie. take the signatures as they are. πŸ’…

later, bestie β€” this Misc.EnvLazy(3) page was served by OCamldoc, dated 2022-03-11. bye πŸ’–

πŸ“¦ where this page comes from