diff options
author | 2008-06-22 10:21:38 -0400 | |
---|---|---|
committer | 2008-06-22 10:21:38 -0400 | |
commit | 3b6cb47aff3c43b36945c1558eb21d3c7661a9c4 (patch) | |
tree | 4570f1ce1befeaa15dd6b15de8768925b097c0eb /src/cjrize.sml | |
parent | d60f854fc35ce30fb698f3d8e87b88938001fdaf (diff) |
FFI through cjrize
Diffstat (limited to 'src/cjrize.sml')
-rw-r--r-- | src/cjrize.sml | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cjrize.sml b/src/cjrize.sml index 2647ad24..ef4abea2 100644 --- a/src/cjrize.sml +++ b/src/cjrize.sml @@ -93,15 +93,20 @@ fun cifyTyp ((t, loc), sm) = ((L'.TRecord si, loc), sm) end | L.TNamed n => ((L'.TNamed n, loc), sm) - | L.TFfi _ => raise Fail "Cjrize TFfi" + | L.TFfi mx => ((L'.TFfi mx, loc), sm) fun cifyExp ((e, loc), sm) = case e of L.EPrim p => ((L'.EPrim p, loc), sm) | L.ERel n => ((L'.ERel n, loc), sm) | L.ENamed n => ((L'.ENamed n, loc), sm) - | L.EFfi _ => raise Fail "Cjrize EFfi" - | L.EFfiApp _ => raise Fail "Cjrize EFfiApp" + | L.EFfi mx => ((L'.EFfi mx, loc), sm) + | L.EFfiApp (m, x, es) => + let + val (es, sm) = ListUtil.foldlMap cifyExp sm es + in + ((L'.EFfiApp (m, x, es), loc), sm) + end | L.ECode n => ((L'.ECode n, loc), sm) | L.EApp (e1, e2) => let |