package owi

  1. Overview
  2. Docs

Module Owi.ValueSource

Module to define externref values in OCaml. You should look in the `example` directory to understand how to use this before reading the code...

Sourcetype ('a, 'b) eq =
  1. | Eq : ('a, 'a) eq
Sourcemodule Extern_ref : sig ... end
Sourcetype externref =
  1. | E : 'a Extern_ref.ty * 'a -> externref
Sourcemodule Func : sig ... end
Sourcetype 'a ref_value =
  1. | Externref of externref option
  2. | Funcref of 'a Func.t option
Sourcetype 'a t =
  1. | I32 of Int32.t
  2. | I64 of Int64.t
  3. | F32 of Owi.Float32.t
  4. | F64 of Owi.Float64.t
  5. | Ref of 'a ref_value
Sourceval cast_ref : externref -> 'a Extern_ref.ty -> 'a option
Sourceval ref_null' : Types.ref_type -> 'a ref_value
Sourceval ref_null : Types.ref_type -> 'a t
Sourceval ref_func : 'a Func.t -> 'a t
Sourceval is_ref_null : 'a ref_value -> bool
Sourceval pp : Format.formatter -> 'a t -> unit