summaryrefslogtreecommitdiff
path: root/src/expl_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-14 09:11:58 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-14 09:11:58 -0400
commit9e6bd5dd1394c99f0a9b29369a4957c958e0830c (patch)
tree40c991c6a8032bc73433e5d3f9c1db78a98674ef /src/expl_print.sml
parent22b407de7cf9ee5cc5947369372d9ca8373134a6 (diff)
Fix a nasty binding bug in CoreUtil
Diffstat (limited to 'src/expl_print.sml')
-rw-r--r--src/expl_print.sml16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/expl_print.sml b/src/expl_print.sml
index e6b28fea..7aa36c6d 100644
--- a/src/expl_print.sml
+++ b/src/expl_print.sml
@@ -219,9 +219,19 @@ fun p_pat' par env (p, _) =
| PVar (s, _) => string s
| PPrim p => Prim.p_t p
| PCon (_, pc, _, NONE) => p_patCon env pc
- | PCon (_, pc, _, SOME p) => parenIf par (box [p_patCon env pc,
- space,
- p_pat' true env p])
+ | PCon (_, pc, cs, SOME p) =>
+ if !debug then
+ parenIf par (box [p_patCon env pc,
+ string "[",
+ p_list (p_con env) cs,
+ string "]",
+ space,
+ p_pat' true env p])
+ else
+ parenIf par (box [p_patCon env pc,
+ space,
+ p_pat' true env p])
+
| PRecord xps =>
box [string "{",
p_list_sep (box [string ",", space]) (fn (x, p, _) =>