diff options
Diffstat (limited to 'src/source_print.sml')
-rw-r--r-- | src/source_print.sml | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/source_print.sml b/src/source_print.sml index 68ef3508..93416fd3 100644 --- a/src/source_print.sml +++ b/src/source_print.sml @@ -171,8 +171,20 @@ fun p_pat' par (p, _) = | PCon (ms, x, SOME p) => parenIf par (box [p_list_sep (string ".") string (ms @ [x]), space, p_pat' true p]) - -val p_pat = p_pat' false + | PRecord (xps, flex) => + let + val pps = map (fn (x, p) => box [string "x", space, string "=", space, p_pat p]) xps + in + box [string "{", + p_list_sep (box [string ",", space]) (fn x => x) + (if flex then + pps + else + pps @ [string "..."]), + string "}"] + end + +and p_pat x = p_pat' false x fun p_exp' par (e, _) = case e of |