package ocaml-base-compiler

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

User events is a way for libraries to provide runtime events that can be consumed by other tools. These events can carry known data types or custom values. The current maximum number of user events is 8192.

type tag = ..

The type for a user event tag. Tags are used to discriminate between user events of the same type.

type 'value t

The type for a user event. User events describe their tag, carried data type and an unique string-based name.

val register : string -> tag -> 'value Type.t -> 'value t

register name tag ty registers a new event with an unique name, carrying a tag and values of type ty.

val write : 'value t -> 'value -> unit

write t v emits value v for event t.

val name : _ t -> string

name t is the unique identifying name of event t.

val tag : 'a t -> tag

tag t is the associated tag of event t, when it is known. An event can be unknown if it was not registered in the consumer program.

OCaml

Innovation. Community. Security.