comparison src/cjr_env.sml @ 121:91027db5a07c

Multiple arguments to web functions
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Jul 2008 20:24:05 -0400
parents 813e5a52063d
children 78d59cf0a0cc
comparison
equal deleted inserted replaced
120:6230bdd122e7 121:91027db5a07c
117 | SOME x => x 117 | SOME x => x
118 118
119 fun declBinds env (d, loc) = 119 fun declBinds env (d, loc) =
120 case d of 120 case d of
121 DVal (x, n, t, _) => pushENamed env x n t 121 DVal (x, n, t, _) => pushENamed env x n t
122 | DFun (fx, n, _, dom, ran, _) => pushENamed env fx n (TFun (dom, ran), loc) 122 | DFun (fx, n, args, ran, _) =>
123 let
124 val t = foldl (fn ((_, arg), t) => (TFun (arg, t), loc)) ran args
125 in
126 pushENamed env fx n t
127 end
123 | DStruct (n, xts) => pushStruct env n xts 128 | DStruct (n, xts) => pushStruct env n xts
124 129
125 end 130 end