The unpac monorepo manager self-hosting as a monorepo using unpac

refactor: change Pair to Tuple (#544)

authored by

Rudi Grinberg and committed by
GitHub
a03f6c64 0b93b609

+3 -3
+2 -2
lib/dyn.ml
··· 1 1 type t = 2 2 | Int of int 3 - | Pair of t * t 3 + | Tuple of t list 4 4 | Enum of string 5 5 | List of t list 6 6 | Constructor of string * t list ··· 9 9 let variant x y = Constructor (x, y) 10 10 let list x = List x 11 11 let int x = Int x 12 - let pair x y = Pair (x, y) 12 + let pair x y = Tuple [ x; y ] 13 13 let record fields = Record fields
+1 -1
lib_test/expect/import.ml
··· 63 63 let rec sexp_of_dyn (t : Re_private.Dyn.t) : Base.Sexp.t = 64 64 match t with 65 65 | Int i -> Atom (Int.to_string i) 66 - | Pair (x, y) -> List [ sexp_of_dyn x; sexp_of_dyn y ] 66 + | Tuple xs -> List (List.map xs ~f:sexp_of_dyn) 67 67 | Enum s -> Atom s 68 68 | List xs -> List (List.map ~f:sexp_of_dyn xs) 69 69 | Constructor (name, []) -> Atom name