comparison src/expl_print.sml @ 188:8e9f97508f0d

Datatype representation optimization
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 Aug 2008 19:49:21 -0400
parents d11754ffe252
children aa54250f58ac
comparison
equal deleted inserted replaced
187:fb6ed259f5bd 188:8e9f97508f0d
179 fun p_pat' par env (p, _) = 179 fun p_pat' par env (p, _) =
180 case p of 180 case p of
181 PWild => string "_" 181 PWild => string "_"
182 | PVar (s, _) => string s 182 | PVar (s, _) => string s
183 | PPrim p => Prim.p_t p 183 | PPrim p => Prim.p_t p
184 | PCon (pc, NONE) => p_patCon env pc 184 | PCon (_, pc, NONE) => p_patCon env pc
185 | PCon (pc, SOME p) => parenIf par (box [p_patCon env pc, 185 | PCon (_, pc, SOME p) => parenIf par (box [p_patCon env pc,
186 space, 186 space,
187 p_pat' true env p]) 187 p_pat' true env p])
188 | PRecord xps => 188 | PRecord xps =>
189 box [string "{", 189 box [string "{",
190 p_list_sep (box [string ",", space]) (fn (x, p, _) => 190 p_list_sep (box [string ",", space]) (fn (x, p, _) =>
191 box [string x, 191 box [string x,
192 space, 192 space,