Mercurial > urweb
comparison src/core_print.sml @ 144:f0d3402184d1
Simple forms work
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 22 Jul 2008 15:12:20 -0400 |
parents | fd98dd10dce7 |
children | 7420fa18d657 |
comparison
equal
deleted
inserted
replaced
143:4b9c2bd6157c | 144:f0d3402184d1 |
---|---|
262 string "=", | 262 string "=", |
263 space, | 263 space, |
264 p_exp env e] | 264 p_exp env e] |
265 end | 265 end |
266 | 266 |
267 fun p_export_kind ck = | |
268 case ck of | |
269 Link => string "link" | |
270 | Action => string "action" | |
271 | |
267 fun p_decl env (dAll as (d, _) : decl) = | 272 fun p_decl env (dAll as (d, _) : decl) = |
268 case d of | 273 case d of |
269 DCon (x, n, k, c) => | 274 DCon (x, n, k, c) => |
270 let | 275 let |
271 val xp = if !debug then | 276 val xp = if !debug then |
298 space, | 303 space, |
299 string "rec", | 304 string "rec", |
300 space, | 305 space, |
301 p_list_sep (box [newline, string "and", space]) (p_vali env) vis] | 306 p_list_sep (box [newline, string "and", space]) (p_vali env) vis] |
302 end | 307 end |
303 | DExport n => box [string "export", | 308 | DExport (ek, n) => box [string "export", |
304 space, | 309 space, |
305 p_enamed env n] | 310 p_export_kind ek, |
311 space, | |
312 p_enamed env n, | |
313 space, | |
314 string "as", | |
315 space, | |
316 p_con env (#2 (E.lookupENamed env n))] | |
306 | 317 |
307 fun p_file env file = | 318 fun p_file env file = |
308 let | 319 let |
309 val (pds, _) = ListUtil.foldlMap (fn (d, env) => | 320 val (pds, _) = ListUtil.foldlMap (fn (d, env) => |
310 (p_decl env d, | 321 (p_decl env d, |