diff options
author | 2010-09-09 12:42:25 -0400 | |
---|---|---|
committer | 2010-09-09 12:42:25 -0400 | |
commit | e0f7a1d2e4ed4d0a264f042de8698fe98bc3b88c (patch) | |
tree | 691773c8f6432547bb7ae6cfd50a46cef9e527dc /src/cjr_print.sml | |
parent | df1314f40a89b39188c26a303f09e673bf061070 (diff) |
Support empty datatypes, which can now be generated via 'variant []'
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r-- | src/cjr_print.sml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml index 5282ddc2..ae347eb2 100644 --- a/src/cjr_print.sml +++ b/src/cjr_print.sml @@ -2011,8 +2011,11 @@ fun p_decl env (dAll as (d, _) : decl) = space, string "{", space, - p_list_sep (box [string ",", space]) (fn (x, n, _) => - string ("__uwc_" ^ ident x ^ "_" ^ Int.toString n)) xncs, + case xncs of + [] => string ("__uwec_" ^ ident x ^ "_" ^ Int.toString n) + | _ => + p_list_sep (box [string ",", space]) (fn (x, n, _) => + string ("__uwc_" ^ ident x ^ "_" ^ Int.toString n)) xncs, space, string "};"] | p_one (Option, _, _, _) = box [] |