From 3af60fa32f42dc949ff1e09ef524c15a43c68fd9 Mon Sep 17 00:00:00 2001 From: OriginLabs-Iguernlala Date: Wed, 24 Feb 2021 07:55:25 +0100 Subject: [PATCH] support n-ary pair construct in Michelson types --- tools/liquidity/with-dune-network/liquidFromMicheline.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/liquidity/with-dune-network/liquidFromMicheline.ml b/tools/liquidity/with-dune-network/liquidFromMicheline.ml index 656bd07e..3ba2da79 100644 --- a/tools/liquidity/with-dune-network/liquidFromMicheline.ml +++ b/tools/liquidity/with-dune-network/liquidFromMicheline.ml @@ -259,6 +259,11 @@ let rec convert_type ?(parameter=false) env expr = with Exit -> Ttuple [convert_type env x; convert_type env y] end + | Prim(k, "pair", e1::((_::_::_) as l), _debug) -> + let e2 = Prim(k, "pair", l, _debug) in + let e = Prim(k, "pair", [e1; e2], _debug) in + convert_type ~parameter env e + | Prim(_, "or", [x;y], _debug) -> begin match name with (* | None when not parameter -> Tor (convert_type env x, convert_type env y) *)