···11type t =
22 | Int of int
33- | Pair of t * t
33+ | Tuple of t list
44 | Enum of string
55 | List of t list
66 | Constructor of string * t list
···99let variant x y = Constructor (x, y)
1010let list x = List x
1111let int x = Int x
1212-let pair x y = Pair (x, y)
1212+let pair x y = Tuple [ x; y ]
1313let record fields = Record fields
+1-1
lib_test/expect/import.ml
···6363let rec sexp_of_dyn (t : Re_private.Dyn.t) : Base.Sexp.t =
6464 match t with
6565 | Int i -> Atom (Int.to_string i)
6666- | Pair (x, y) -> List [ sexp_of_dyn x; sexp_of_dyn y ]
6666+ | Tuple xs -> List (List.map xs ~f:sexp_of_dyn)
6767 | Enum s -> Atom s
6868 | List xs -> List (List.map ~f:sexp_of_dyn xs)
6969 | Constructor (name, []) -> Atom name