Mercurial > urweb
comparison src/source_print.sml @ 12:d89477f07c1e
Fun with records
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Fri, 28 Mar 2008 17:34:57 -0400 |
parents | a455a9f85cc3 |
children | f1c36df29ed7 |
comparison
equal
deleted
inserted
replaced
11:e97c6d335869 | 12:d89477f07c1e |
---|---|
168 space, | 168 space, |
169 string "=>", | 169 string "=>", |
170 space, | 170 space, |
171 p_exp e]) | 171 p_exp e]) |
172 | 172 |
173 | ERecord xes => box [string "{", | |
174 p_list (fn (x, e) => | |
175 box [p_con x, | |
176 space, | |
177 string "=", | |
178 space, | |
179 p_exp e]) xes, | |
180 string "}"] | |
181 | EField (e, c) => box [p_exp' true e, | |
182 string ".", | |
183 p_con' true c] | |
184 | |
185 | |
173 and p_exp e = p_exp' false e | 186 and p_exp e = p_exp' false e |
174 | 187 |
175 fun p_decl ((d, _) : decl) = | 188 fun p_decl ((d, _) : decl) = |
176 case d of | 189 case d of |
177 DCon (x, NONE, c) => box [string "con", | 190 DCon (x, NONE, c) => box [string "con", |