48 lines
1.4 KiB
OCaml
48 lines
1.4 KiB
OCaml
(* automatically generated by ocamltarzan *)
|
|
|
|
open Common
|
|
|
|
let sexp_of_either _of_a _of_b =
|
|
function
|
|
| Left v1 -> let v1 = _of_a v1 in Sexp.List [ Sexp.Atom "Left"; v1 ]
|
|
| Right v1 -> let v1 = _of_b v1 in Sexp.List [ Sexp.Atom "Right"; v1 ]
|
|
|
|
let sexp_of_either3 _of_a _of_b _of_c =
|
|
function
|
|
| Left3 v1 -> let v1 = _of_a v1 in Sexp.List [ Sexp.Atom "Left3"; v1 ]
|
|
| Middle3 v1 -> let v1 = _of_b v1 in Sexp.List [ Sexp.Atom "Middle3"; v1 ]
|
|
| Right3 v1 -> let v1 = _of_c v1 in Sexp.List [ Sexp.Atom "Right3"; v1 ]
|
|
|
|
|
|
let sexp_of_filename v = Conv.sexp_of_string v
|
|
let sexp_of_dirname v = Conv.sexp_of_string v
|
|
|
|
let sexp_of_set _of_a = Conv.sexp_of_list _of_a
|
|
|
|
let sexp_of_assoc _of_a _of_b =
|
|
Conv.sexp_of_list
|
|
(fun (v1, v2) ->
|
|
let v1 = _of_a v1 and v2 = _of_b v2 in Sexp.List [ v1; v2 ])
|
|
|
|
let sexp_of_hashset _of_a = Conv.sexp_of_hashtbl _of_a Conv.sexp_of_bool
|
|
|
|
let sexp_of_stack _of_a = Conv.sexp_of_list _of_a
|
|
|
|
|
|
|
|
let sexp_of_score_result =
|
|
function
|
|
| Common2.Ok -> Sexp.Atom "Ok"
|
|
| Common2.Pb v1 ->
|
|
let v1 = Conv.sexp_of_string v1 in Sexp.List [ Sexp.Atom "Pb"; v1 ]
|
|
|
|
let sexp_of_score v =
|
|
Conv.sexp_of_hashtbl Conv.sexp_of_string sexp_of_score_result v
|
|
|
|
let sexp_of_score_list v =
|
|
Conv.sexp_of_list
|
|
(fun (v1, v2) ->
|
|
let v1 = Conv.sexp_of_string v1
|
|
and v2 = sexp_of_score_result v2
|
|
in Sexp.List [ v1; v2 ])
|
|
v
|