summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-04-16 10:12:04 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2012-04-16 10:12:04 -0400
commita403a8d5343719e7bfc663cfb45ca09ade0ad77d (patch)
tree9e59dcd228c72ece5a964b86b6a487f863d671be
parent3c509a1766d03bc1854d2d70e2d1611eb4e2c3f9 (diff)
Tweak printing of constructor record literals to allow re-parsing by compiler
-rw-r--r--src/elab_print.sml4
-rw-r--r--tests/badVariant.ur1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/elab_print.sml b/src/elab_print.sml
index d292d7c5..46ad9285 100644
--- a/src/elab_print.sml
+++ b/src/elab_print.sml
@@ -169,7 +169,7 @@ fun p_con' par env (c, _) =
if !debug then
parenIf par (box [string "[",
p_list (fn (x, c) =>
- box [p_con env x,
+ box [p_name env x,
space,
string "=",
space,
@@ -179,7 +179,7 @@ fun p_con' par env (c, _) =
else
parenIf par (box [string "[",
p_list (fn (x, c) =>
- box [p_con env x,
+ box [p_name env x,
space,
string "=",
space,
diff --git a/tests/badVariant.ur b/tests/badVariant.ur
new file mode 100644
index 00000000..99e346c0
--- /dev/null
+++ b/tests/badVariant.ur
@@ -0,0 +1 @@
+val q : variant [X = int, Y = float] = make [#Z] "hi"