package hardcaml

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

Create_options is a record with one field for each with_create_options argument. It allows one to define a function of type _ with_create_options that takes the same optional arguments as create_exn and to pass those options on to create_exn, without every having to directly refer to any of the arguments. This makes wrapper code robust to changes in what the optional arguments are. Here is the usage idiom:

module M : sig
  val f : (...) Circuit.with_create_options
end = struct
  let f =
    Circuit.with_create_options (fun create_options ->
      ...
      call_with_create_options Circuit.create_exn create_options ~name signals;
      ...)
end
type t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t