comparison src/source_print.sml @ 207:cc68da3801bc

Non-star SELECT
author Adam Chlipala <adamc@hcoop.net>
date Thu, 14 Aug 2008 18:35:08 -0400
parents dd82457fda82
children f4033abd6ab1
comparison
equal deleted inserted replaced
206:cb8493759a7b 207:cc68da3801bc
44 p_kind k2]) 44 p_kind k2])
45 | KName => string "Name" 45 | KName => string "Name"
46 | KRecord k => box [string "{", p_kind k, string "}"] 46 | KRecord k => box [string "{", p_kind k, string "}"]
47 | KUnit => string "Unit" 47 | KUnit => string "Unit"
48 | KWild => string "_" 48 | KWild => string "_"
49 | KTuple ks => box [string "(",
50 p_list_sep (box [space, string "*", space]) p_kind ks,
51 string ")"]
49 52
50 and p_kind k = p_kind' false k 53 and p_kind k = p_kind' false k
51 54
52 fun p_explicitness e = 55 fun p_explicitness e =
53 case e of 56 case e of
152 | CWild k => box [string "(_", 155 | CWild k => box [string "(_",
153 space, 156 space,
154 string "::", 157 string "::",
155 space, 158 space,
156 p_kind k] 159 p_kind k]
160
161 | CTuple cs => box [string "(",
162 p_list p_con cs,
163 string ")"]
164 | CProj (c, n) => box [p_con c,
165 string ".",
166 string (Int.toString n)]
157 167
158 and p_con c = p_con' false c 168 and p_con c = p_con' false c
159 169
160 and p_name (all as (c, _)) = 170 and p_name (all as (c, _)) =
161 case c of 171 case c of