comparison src/source_print.sml @ 173:8221b95cc24c

Patterns for int and string constants
author Adam Chlipala <adamc@hcoop.net>
date Thu, 31 Jul 2008 10:44:52 -0400
parents c7a6e6dbc318
children 7ee424760d2f
comparison
equal deleted inserted replaced
172:021f5beb6f8d 173:8221b95cc24c
164 164
165 fun p_pat' par (p, _) = 165 fun p_pat' par (p, _) =
166 case p of 166 case p of
167 PWild => string "_" 167 PWild => string "_"
168 | PVar s => string s 168 | PVar s => string s
169 | PPrim p => Prim.p_t p
169 | PCon (ms, x, NONE) => p_list_sep (string ".") string (ms @ [x]) 170 | PCon (ms, x, NONE) => p_list_sep (string ".") string (ms @ [x])
170 | PCon (ms, x, SOME p) => parenIf par (box [p_list_sep (string ".") string (ms @ [x]), 171 | PCon (ms, x, SOME p) => parenIf par (box [p_list_sep (string ".") string (ms @ [x]),
171 space, 172 space,
172 p_pat' true p]) 173 p_pat' true p])
173 174