comparison src/mono_util.sml @ 290:df00701f2323

'read' type class
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Sep 2008 11:53:30 -0400
parents 4260ad920c36
children 59dc042629b9
comparison
equal deleted inserted replaced
289:0cc956a3216f 290:df00701f2323
143 | ECon (_, _, NONE) => S.return2 eAll 143 | ECon (_, _, NONE) => S.return2 eAll
144 | ECon (dk, n, SOME e) => 144 | ECon (dk, n, SOME e) =>
145 S.map2 (mfe ctx e, 145 S.map2 (mfe ctx e,
146 fn e' => 146 fn e' =>
147 (ECon (dk, n, SOME e'), loc)) 147 (ECon (dk, n, SOME e'), loc))
148 | ESome (t, e) =>
149 S.bind2 (mft t,
150 fn t' =>
151 S.map2 (mfe ctx e,
152 fn e' =>
153 (ESome (t', e'), loc)))
148 | EFfi _ => S.return2 eAll 154 | EFfi _ => S.return2 eAll
149 | EFfiApp (m, x, es) => 155 | EFfiApp (m, x, es) =>
150 S.map2 (ListUtil.mapfold (fn e => mfe ctx e) es, 156 S.map2 (ListUtil.mapfold (fn e => mfe ctx e) es,
151 fn es' => 157 fn es' =>
152 (EFfiApp (m, x, es'), loc)) 158 (EFfiApp (m, x, es'), loc))