comparison src/reduce.sml @ 109:813e5a52063d

Remove closure conversion in favor of zany fun with modules, which also replaces 'page'
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Jul 2008 10:17:06 -0400
parents 144d082b47ae
children 55d8cfa4d024
comparison
equal deleted inserted replaced
108:f59553dc1b6a 109:813e5a52063d
113 fun bind (env, b) = 113 fun bind (env, b) =
114 case b of 114 case b of
115 U.Decl.RelC (x, k) => E.pushCRel env x k 115 U.Decl.RelC (x, k) => E.pushCRel env x k
116 | U.Decl.NamedC (x, n, k, co) => E.pushCNamed env x n k co 116 | U.Decl.NamedC (x, n, k, co) => E.pushCNamed env x n k co
117 | U.Decl.RelE (x, t) => E.pushERel env x t 117 | U.Decl.RelE (x, t) => E.pushERel env x t
118 | U.Decl.NamedE (x, n, t, eo) => E.pushENamed env x n t eo 118 | U.Decl.NamedE (x, n, t, eo, s) => E.pushENamed env x n t eo s
119 119
120 fun kind k = k 120 fun kind k = k
121 121
122 fun con env c = 122 fun con env c =
123 case c of 123 case c of
141 141
142 fun exp env e = 142 fun exp env e =
143 case e of 143 case e of
144 ENamed n => 144 ENamed n =>
145 (case E.lookupENamed env n of 145 (case E.lookupENamed env n of
146 (_, _, SOME e') => #1 e' 146 (_, _, SOME e', _) => #1 e'
147 | _ => e) 147 | _ => e)
148 148
149 | ECApp ((EApp ((EApp ((ECApp ((EFold ks, _), ran), _), f), _), i), _), (CRecord (k, xcs), loc)) => 149 | ECApp ((EApp ((EApp ((ECApp ((EFold ks, _), ran), _), f), _), i), _), (CRecord (k, xcs), loc)) =>
150 (case xcs of 150 (case xcs of
151 [] => #1 i 151 [] => #1 i