summaryrefslogtreecommitdiff
path: root/src/value.ml
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-08-30 15:33:18 +0100
committerAlasdair Armstrong2018-08-30 15:34:46 +0100
commitd97e6b84bfb66c141e3dfadb8edbd9afada77664 (patch)
treef9086b2bea34d909410946c729e55be731782a31 /src/value.ml
parenta5ad2059821b86ef26a86d78c40cc680c57aa94e (diff)
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.
Diffstat (limited to 'src/value.ml')
-rw-r--r--src/value.ml1
1 files changed, 1 insertions, 0 deletions
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