aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/source_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2014-05-02 17:16:02 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2014-05-02 17:16:02 -0400
commit77b4d9b9397aefc41ae0c6465a75874c497d945c (patch)
tree1249a913f37685611f686a4c5db3475723c93d21 /src/source_print.sml
parent1580340ec252e4e399c2c1d2b403974f49c3a084 (diff)
Monadic bind supports patterns
Diffstat (limited to 'src/source_print.sml')
-rw-r--r--src/source_print.sml22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/source_print.sml b/src/source_print.sml
index ce095542..fdacfe6c 100644
--- a/src/source_print.sml
+++ b/src/source_print.sml
@@ -277,14 +277,20 @@ fun p_exp' par (e, _) =
space,
string "!"])
- | ERecord xes => box [string "{",
- p_list (fn (x, e) =>
- box [p_name x,
- space,
- string "=",
- space,
- p_exp e]) xes,
- string "}"]
+ | ERecord (xes, flex) => box [string "{",
+ p_list (fn (x, e) =>
+ box [p_name x,
+ space,
+ string "=",
+ space,
+ p_exp e]) xes,
+ if flex then
+ box [string ",",
+ space,
+ string "..."]
+ else
+ box [],
+ string "}"]
| EField (e, c) => box [p_exp' true e,
string ".",
p_con' true c]