Mercurial > urweb
comparison src/elab_util.sml @ 621:8998114760c1
"Hello world" compiles, after replacing type-level fold with map
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 21 Feb 2009 15:33:20 -0500 |
parents | 44958d74c43f |
children | 588b9d16b00a |
comparison
equal
deleted
inserted
replaced
620:d828b143e147 | 621:8998114760c1 |
---|---|
166 S.bind2 (mfc ctx c1, | 166 S.bind2 (mfc ctx c1, |
167 fn c1' => | 167 fn c1' => |
168 S.map2 (mfc ctx c2, | 168 S.map2 (mfc ctx c2, |
169 fn c2' => | 169 fn c2' => |
170 (CConcat (c1', c2'), loc))) | 170 (CConcat (c1', c2'), loc))) |
171 | CFold (k1, k2) => | 171 | CMap (k1, k2) => |
172 S.bind2 (mfk k1, | 172 S.bind2 (mfk k1, |
173 fn k1' => | 173 fn k1' => |
174 S.map2 (mfk k2, | 174 S.map2 (mfk k2, |
175 fn k2' => | 175 fn k2' => |
176 (CFold (k1', k2'), loc))) | 176 (CMap (k1', k2'), loc))) |
177 | 177 |
178 | CUnit => S.return2 cAll | 178 | CUnit => S.return2 cAll |
179 | 179 |
180 | CTuple cs => | 180 | CTuple cs => |
181 S.map2 (ListUtil.mapfold (mfc ctx) cs, | 181 S.map2 (ListUtil.mapfold (mfc ctx) cs, |