package stdune

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A poor man's unboxed option type. The value stored must not be immediate, unless it is a non-negative integer. In particular, unboxed options cannot be nested.

type 'a t
val none : 'a t
val some : 'a -> 'a t
val is_none : 'a t -> bool
val is_some : 'a t -> bool
val value_exn : 'a t -> 'a
val to_option : 'a t -> 'a option
val iter : 'a t -> f:('a -> unit) -> unit
val match_ : 'a t -> none:(unit -> 'b) -> some:('a -> 'b) -> 'b
val to_dyn : ('a -> Dyn.t) -> 'a t -> Dyn.t