summaryrefslogtreecommitdiff
path: root/src/source_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-16 15:14:17 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-16 15:14:17 -0400
commit0159bec5067ac88f3f222595ac6f5e2f94c1d41f (patch)
tree6d35712f3fc54d19a3d1a605a45840ded71a914e /src/source_print.sml
parentc28e1690efd89b7629bfdc81d5dee2d3d37952ca (diff)
Mutual datatypes through Elaborate
Diffstat (limited to 'src/source_print.sml')
-rw-r--r--src/source_print.sml12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/source_print.sml b/src/source_print.sml
index 0f8b093b..b4f9bfd3 100644
--- a/src/source_print.sml
+++ b/src/source_print.sml
@@ -360,9 +360,7 @@ and p_vali (x, co, e) =
fun p_datatype (x, xs, cons) =
- box [string "datatype",
- space,
- string x,
+ box [string x,
p_list_sep (box []) (fn x => box [space, string x]) xs,
space,
string "=",
@@ -399,7 +397,9 @@ fun p_sgn_item (sgi, _) =
string "=",
space,
p_con c]
- | SgiDatatype x => p_datatype x
+ | SgiDatatype x => box [string "datatype",
+ space,
+ p_list_sep (box [space, string "and", space]) p_datatype x]
| SgiDatatypeImp (x, ms, x') =>
box [string "datatype",
space,
@@ -530,7 +530,9 @@ fun p_decl ((d, _) : decl) =
string "=",
space,
p_con c]
- | DDatatype x => p_datatype x
+ | DDatatype x => box [string "datatype",
+ space,
+ p_list_sep (box [space, string "and", space]) p_datatype x]
| DDatatypeImp (x, ms, x') =>
box [string "datatype",
space,