Mercurial > urweb
comparison src/monoize.sml @ 51:92361a008a10
FFI through monoize
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 22 Jun 2008 10:12:23 -0400 |
parents | 0a5c312de09a |
children | 8e9920db39f2 |
comparison
equal
deleted
inserted
replaced
50:d37518b67bd2 | 51:92361a008a10 |
---|---|
61 (L'.TRecord (map (fn (x, t) => (monoName env x, monoType env t)) xcs), loc) | 61 (L'.TRecord (map (fn (x, t) => (monoName env x, monoType env t)) xcs), loc) |
62 | L.TRecord _ => poly () | 62 | L.TRecord _ => poly () |
63 | 63 |
64 | L.CRel _ => poly () | 64 | L.CRel _ => poly () |
65 | L.CNamed n => (L'.TNamed n, loc) | 65 | L.CNamed n => (L'.TNamed n, loc) |
66 | L.CFfi _ => raise Fail "Monoize CFfi" | 66 | L.CFfi mx => (L'.TFfi mx, loc) |
67 | L.CApp _ => poly () | 67 | L.CApp _ => poly () |
68 | L.CAbs _ => poly () | 68 | L.CAbs _ => poly () |
69 | 69 |
70 | L.CName _ => poly () | 70 | L.CName _ => poly () |
71 | 71 |
84 in | 84 in |
85 case e of | 85 case e of |
86 L.EPrim p => (L'.EPrim p, loc) | 86 L.EPrim p => (L'.EPrim p, loc) |
87 | L.ERel n => (L'.ERel n, loc) | 87 | L.ERel n => (L'.ERel n, loc) |
88 | L.ENamed n => (L'.ENamed n, loc) | 88 | L.ENamed n => (L'.ENamed n, loc) |
89 | L.EFfi _ => raise Fail "Monoize EFfi" | 89 | L.EFfi mx => (L'.EFfi mx, loc) |
90 | L.EFfiApp _ => raise Fail "Monoize EFfiApp" | 90 | L.EFfiApp (m, x, es) => (L'.EFfiApp (m, x, map (monoExp env) es), loc) |
91 | L.EApp (e1, e2) => (L'.EApp (monoExp env e1, monoExp env e2), loc) | 91 | L.EApp (e1, e2) => (L'.EApp (monoExp env e1, monoExp env e2), loc) |
92 | L.EAbs (x, dom, ran, e) => | 92 | L.EAbs (x, dom, ran, e) => |
93 (L'.EAbs (x, monoType env dom, monoType env ran, monoExp (Env.pushERel env x dom) e), loc) | 93 (L'.EAbs (x, monoType env dom, monoType env ran, monoExp (Env.pushERel env x dom) e), loc) |
94 | L.ECApp _ => poly () | 94 | L.ECApp _ => poly () |
95 | L.ECAbs _ => poly () | 95 | L.ECAbs _ => poly () |