o1-labs / ocamlbyexample

Learn Ocaml by reading code examples
https://o1-labs.github.io/ocamlbyexample/
69 stars 4 forks source link

teach debugging with sexp #7

Open mimoo opened 3 years ago

mimoo commented 3 years ago
printf !"%{sexp: (unit, Fp.t) Gate_spec.t list}\n" g;

and sexp_opaque and deriving sexp

mimoo commented 2 years ago

associated record:

  type ('row, 'f) t =
    { kind : (Kimchi.Protocol.gate_type[@sexp.opaque])
    ; wired_to : 'row Position.t array
    ; coeffs : 'f array
    }
  [@@deriving sexp_of]