package bonsai

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val extension_constructor : Obj.Extension_constructor.t

The easiest way to define extension_constructor is to use the built-in extension node:

type ('input, 'model, 'action, 'result, 'incr, 'event) unpacked +=
  | C : foo -> (_, _, _, _, _, _) unpacked

let extension_constructor = [%extension_constructor C]
val sexp_of_unpacked : ('a, 'b, 'c, 'd, 'e, 'f) unpacked -> Core_kernel.Sexp.t

Only needs to handle the case(s) defined in this module.

val eval : ('input, 'model, 'action, 'result, 'incr, 'event) eval_type

Only needs to handle the case(s) defined in this module.

val visit : ('input, 'result, 'incr, 'event) Packed.t -> Visitor.t -> ('input, 'result, 'incr, 'event) Packed.t

An implementation of visit only needs to handle the cases defined in this module.

The implementation of visit should call visit_ext on any subcomponents contained in the constructor. With the new subcomponents returned by visit_ext, the implementation should re-construct itself, and call visit on this new value.

OCaml

Innovation. Community. Security.