comparison src/monoize.sml @ 48:0a5c312de09a

Start of FFI
author Adam Chlipala <adamc@hcoop.net>
date Sun, 22 Jun 2008 09:27:29 -0400
parents 537db4ee89f4
children 92361a008a10
comparison
equal deleted inserted replaced
47:ac4c0b4111ba 48:0a5c312de09a
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.CApp _ => poly () 67 | L.CApp _ => poly ()
67 | L.CAbs _ => poly () 68 | L.CAbs _ => poly ()
68 69
69 | L.CName _ => poly () 70 | L.CName _ => poly ()
70 71
83 in 84 in
84 case e of 85 case e of
85 L.EPrim p => (L'.EPrim p, loc) 86 L.EPrim p => (L'.EPrim p, loc)
86 | L.ERel n => (L'.ERel n, loc) 87 | L.ERel n => (L'.ERel n, loc)
87 | L.ENamed n => (L'.ENamed n, loc) 88 | L.ENamed n => (L'.ENamed n, loc)
89 | L.EFfi _ => raise Fail "Monoize EFfi"
90 | L.EFfiApp _ => raise Fail "Monoize EFfiApp"
88 | 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)
89 | L.EAbs (x, dom, ran, e) => 92 | L.EAbs (x, dom, ran, e) =>
90 (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)
91 | L.ECApp _ => poly () 94 | L.ECApp _ => poly ()
92 | L.ECAbs _ => poly () 95 | L.ECAbs _ => poly ()