diff options
Diffstat (limited to 'src/cjrize.sml')
-rw-r--r-- | src/cjrize.sml | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/cjrize.sml b/src/cjrize.sml index cf32e414..a4f35723 100644 --- a/src/cjrize.sml +++ b/src/cjrize.sml @@ -84,7 +84,21 @@ fun cifyTyp ((t, loc), sm) = in ((L'.TRecord si, loc), sm) end - | L.TNamed n => ((L'.TDatatype n, loc), sm) + | L.TDatatype (n, xncs) => + let + val (xncs, sm) = ListUtil.foldlMap (fn ((x, n, to), sm) => + case to of + NONE => ((x, n, NONE), sm) + | SOME t => + let + val (t, sm) = cifyTyp (t, sm) + in + ((x, n, SOME t), sm) + end) + sm xncs + in + ((L'.TDatatype (n, xncs), loc), sm) + end | L.TFfi mx => ((L'.TFfi mx, loc), sm) val dummye = (L'.EPrim (Prim.Int 0), ErrorMsg.dummySpan) |