Mercurial > urweb
comparison src/cjrize.sml @ 52:198172560b73
FFI through cloconv
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 22 Jun 2008 10:17:34 -0400 |
parents | 537db4ee89f4 |
children | 4f641f8fddaa |
comparison
equal
deleted
inserted
replaced
51:92361a008a10 | 52:198172560b73 |
---|---|
91 val (sm, si) = Sm.find (sm, old_xts, xts) | 91 val (sm, si) = Sm.find (sm, old_xts, xts) |
92 in | 92 in |
93 ((L'.TRecord si, loc), sm) | 93 ((L'.TRecord si, loc), sm) |
94 end | 94 end |
95 | L.TNamed n => ((L'.TNamed n, loc), sm) | 95 | L.TNamed n => ((L'.TNamed n, loc), sm) |
96 | L.TFfi _ => raise Fail "Cjrize TFfi" | |
96 | 97 |
97 fun cifyExp ((e, loc), sm) = | 98 fun cifyExp ((e, loc), sm) = |
98 case e of | 99 case e of |
99 L.EPrim p => ((L'.EPrim p, loc), sm) | 100 L.EPrim p => ((L'.EPrim p, loc), sm) |
100 | L.ERel n => ((L'.ERel n, loc), sm) | 101 | L.ERel n => ((L'.ERel n, loc), sm) |
101 | L.ENamed n => ((L'.ENamed n, loc), sm) | 102 | L.ENamed n => ((L'.ENamed n, loc), sm) |
103 | L.EFfi _ => raise Fail "Cjrize EFfi" | |
104 | L.EFfiApp _ => raise Fail "Cjrize EFfiApp" | |
102 | L.ECode n => ((L'.ECode n, loc), sm) | 105 | L.ECode n => ((L'.ECode n, loc), sm) |
103 | L.EApp (e1, e2) => | 106 | L.EApp (e1, e2) => |
104 let | 107 let |
105 val (e1, sm) = cifyExp (e1, sm) | 108 val (e1, sm) = cifyExp (e1, sm) |
106 val (e2, sm) = cifyExp (e2, sm) | 109 val (e2, sm) = cifyExp (e2, sm) |