comparison src/monoize.sml @ 94:40d146f467c5

Monoizing cdata
author Adam Chlipala <adamc@hcoop.net>
date Thu, 03 Jul 2008 17:39:17 -0400
parents 275aaeb73f1f
children 274116d1a4cd
comparison
equal deleted inserted replaced
93:94afff1ff7f6 94:40d146f467c5
59 | L.TCFun _ => poly () 59 | L.TCFun _ => poly ()
60 | L.TRecord (L.CRecord ((L.KType, _), xcs), _) => 60 | L.TRecord (L.CRecord ((L.KType, _), xcs), _) =>
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.CApp ((L.CFfi ("Basis", "xml"), _), _) => (L'.TFfi ("Basis", "string"), loc)
65
64 | L.CRel _ => poly () 66 | L.CRel _ => poly ()
65 | L.CNamed n => (L'.TNamed n, loc) 67 | L.CNamed n => (L'.TNamed n, loc)
66 | L.CFfi mx => (L'.TFfi mx, loc) 68 | L.CFfi mx => (L'.TFfi mx, loc)
67 | L.CApp _ => poly () 69 | L.CApp _ => poly ()
68 | L.CAbs _ => poly () 70 | L.CAbs _ => poly ()
88 L.EPrim p => (L'.EPrim p, loc) 90 L.EPrim p => (L'.EPrim p, loc)
89 | L.ERel n => (L'.ERel n, loc) 91 | L.ERel n => (L'.ERel n, loc)
90 | L.ENamed n => (L'.ENamed n, loc) 92 | L.ENamed n => (L'.ENamed n, loc)
91 | L.EFfi mx => (L'.EFfi mx, loc) 93 | L.EFfi mx => (L'.EFfi mx, loc)
92 | L.EFfiApp (m, x, es) => (L'.EFfiApp (m, x, map (monoExp env) es), loc) 94 | L.EFfiApp (m, x, es) => (L'.EFfiApp (m, x, map (monoExp env) es), loc)
95
96 | L.EApp ((L.ECApp ((L.EFfi ("Basis", "cdata"), _),
97 _), _), se) => monoExp env se
98
93 | L.EApp (e1, e2) => (L'.EApp (monoExp env e1, monoExp env e2), loc) 99 | L.EApp (e1, e2) => (L'.EApp (monoExp env e1, monoExp env e2), loc)
94 | L.EAbs (x, dom, ran, e) => 100 | L.EAbs (x, dom, ran, e) =>
95 (L'.EAbs (x, monoType env dom, monoType env ran, monoExp (Env.pushERel env x dom) e), loc) 101 (L'.EAbs (x, monoType env dom, monoType env ran, monoExp (Env.pushERel env x dom) e), loc)
96 | L.ECApp _ => poly () 102 | L.ECApp _ => poly ()
97 | L.ECAbs _ => poly () 103 | L.ECAbs _ => poly ()