Mercurial > urweb
comparison src/mono_print.sml @ 168:25b169416ea8
Storing datatype constructors in type references past monoize
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 29 Jul 2008 15:43:17 -0400 |
parents | 6847741e1f5f |
children | eb3f9913bf31 |
comparison
equal
deleted
inserted
replaced
167:2be573fec9a6 | 168:25b169416ea8 |
---|---|
51 space, | 51 space, |
52 string ":", | 52 string ":", |
53 space, | 53 space, |
54 p_typ env t]) xcs, | 54 p_typ env t]) xcs, |
55 string "}"] | 55 string "}"] |
56 | TNamed n => | 56 | TDatatype (n, _) => |
57 if !debug then | 57 if !debug then |
58 string (#1 (E.lookupTNamed env n) ^ "__" ^ Int.toString n) | 58 string (#1 (E.lookupDatatype env n) ^ "__" ^ Int.toString n) |
59 else | 59 else |
60 string (#1 (E.lookupTNamed env n)) | 60 string (#1 (E.lookupDatatype env n)) |
61 | TFfi (m, x) => box [string "FFI(", string m, string ".", string x, string ")"] | 61 | TFfi (m, x) => box [string "FFI(", string m, string ".", string x, string ")"] |
62 | 62 |
63 and p_typ env = p_typ' false env | 63 and p_typ env = p_typ' false env |
64 | 64 |
65 fun p_enamed env n = | 65 fun p_enamed env n = |
162 p_exp env e] | 162 p_exp env e] |
163 end | 163 end |
164 | 164 |
165 fun p_datatype env (x, n, cons) = | 165 fun p_datatype env (x, n, cons) = |
166 let | 166 let |
167 val env = E.pushTNamed env x n NONE | 167 val env = E.pushDatatype env x n cons |
168 in | 168 in |
169 box [string "datatype", | 169 box [string "datatype", |
170 space, | 170 space, |
171 string x, | 171 string x, |
172 space, | 172 space, |