From d97e6b84bfb66c141e3dfadb8edbd9afada77664 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Thu, 30 Aug 2018 15:33:18 +0100 Subject: C: Fix an issue with struct field being generalised inside polymorphic constructors Add a new printing function for debugging that recursively prints constructor types. Fix an interpreter bug when pattern matching on constructors with tuple types. --- src/value.ml | 1 + 1 file changed, 1 insertion(+) (limited to 'src/value.ml') diff --git a/src/value.ml b/src/value.ml index cb55aa79..76d02850 100644 --- a/src/value.ml +++ b/src/value.ml @@ -110,6 +110,7 @@ let coerce_bit = function | _ -> assert false let coerce_ctor = function + | V_ctor (str, [V_tuple vals]) -> (str, vals) | V_ctor (str, vals) -> (str, vals) | _ -> assert false -- cgit v1.2.3