Mercurial > urweb
comparison src/elab_print.sml @ 71:6431b315a1e3
Elaborate efold
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 26 Jun 2008 11:09:30 -0400 |
parents | 9f89f0b00b84 |
children | 0ee10f4d73cf |
comparison
equal
deleted
inserted
replaced
70:2e0f3b21fb85 | 71:6431b315a1e3 |
---|---|
86 string "}"] | 86 string "}"] |
87 | TRecord c => box [string "$", | 87 | TRecord c => box [string "$", |
88 p_con' true env c] | 88 p_con' true env c] |
89 | 89 |
90 | CRel n => | 90 | CRel n => |
91 if !debug then | 91 ((if !debug then |
92 string (#1 (E.lookupCRel env n) ^ "_" ^ Int.toString n) | 92 string (#1 (E.lookupCRel env n) ^ "_" ^ Int.toString n) |
93 else | 93 else |
94 string (#1 (E.lookupCRel env n)) | 94 string (#1 (E.lookupCRel env n))) |
95 handle E.UnboundRel _ => string ("UNBOUND_REL" ^ Int.toString n)) | |
95 | CNamed n => | 96 | CNamed n => |
96 ((if !debug then | 97 ((if !debug then |
97 string (#1 (E.lookupCNamed env n) ^ "__" ^ Int.toString n) | 98 string (#1 (E.lookupCNamed env n) ^ "__" ^ Int.toString n) |
98 else | 99 else |
99 string (#1 (E.lookupCNamed env n))) | 100 string (#1 (E.lookupCNamed env n))) |
246 string "]"] | 247 string "]"] |
247 else | 248 else |
248 box [p_exp' true env e, | 249 box [p_exp' true env e, |
249 string ".", | 250 string ".", |
250 p_con' true env c] | 251 p_con' true env c] |
251 | 252 | EFold _ => string "fold" |
253 | |
252 | EError => string "<ERROR>" | 254 | EError => string "<ERROR>" |
253 | 255 |
254 and p_exp env = p_exp' false env | 256 and p_exp env = p_exp' false env |
255 | 257 |
256 fun p_named x n = | 258 fun p_named x n = |