comparison src/source_print.sml @ 34:44b5405e74c7

Elaborating module projection
author Adam Chlipala <adamc@hcoop.net>
date Tue, 17 Jun 2008 16:38:54 -0400
parents e6ccf961d8a3
children e3d3c2791105
comparison
equal deleted inserted replaced
33:535c324f0b35 34:44b5405e74c7
86 p_con c]) xcs, 86 p_con c]) xcs,
87 string "}"] 87 string "}"]
88 | TRecord c => box [string "$", 88 | TRecord c => box [string "$",
89 p_con' true c] 89 p_con' true c]
90 90
91 | CVar s => string s 91 | CVar (ss, s) => p_list_sep (string ".") string (ss @ [s])
92 | CApp (c1, c2) => parenIf par (box [p_con c1, 92 | CApp (c1, c2) => parenIf par (box [p_con c1,
93 space, 93 space,
94 p_con' true c2]) 94 p_con' true c2])
95 | CAbs (x, k, c) => parenIf par (box [string "fn", 95 | CAbs (x, k, c) => parenIf par (box [string "fn",
96 space, 96 space,
141 space, 141 space,
142 p_con t, 142 p_con t,
143 string ")"] 143 string ")"]
144 144
145 | EPrim p => Prim.p_t p 145 | EPrim p => Prim.p_t p
146 | EVar s => string s 146 | EVar (ss, s) => p_list_sep (string ".") string (ss @ [s])
147 | EApp (e1, e2) => parenIf par (box [p_exp e1, 147 | EApp (e1, e2) => parenIf par (box [p_exp e1,
148 space, 148 space,
149 p_exp' true e2]) 149 p_exp' true e2])
150 | EAbs (x, NONE, e) => parenIf par (box [string "fn", 150 | EAbs (x, NONE, e) => parenIf par (box [string "fn",
151 space, 151 space,
319 newline, 319 newline,
320 p_list_sep newline p_decl ds, 320 p_list_sep newline p_decl ds,
321 newline, 321 newline,
322 string "end"] 322 string "end"]
323 | StrVar x => string x 323 | StrVar x => string x
324 | StrProj (str, x) => box [p_str str,
325 string ".",
326 string x]
324 327
325 val p_file = p_list_sep newline p_decl 328 val p_file = p_list_sep newline p_decl
326 329
327 end 330 end