[MLton-commit] r6332
Vesa Karvonen
vesak at mlton.org
Wed Jan 16 08:12:20 PST 2008
Allow parentheses around unary constructors. Also fixed a bug in the
tuple case.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/generic/unstable/detail/value/read.sml
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/read.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/read.sml 2008-01-16 13:19:04 UTC (rev 6331)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/read.sml 2008-01-16 16:12:20 UTC (rev 6332)
@@ -385,7 +385,7 @@
then ignored
else ignored >> E#"," >> ignored) >> lp a (i+1) ps))
in
- E#"(" >>> parens (lp (Array.array (n, NONE)) 0 ps)
+ E#"(" >>> parens (fn ? => lp (Array.array (n, NONE)) 0 ps ?)
end
fun record (INP (lps, fromSlice)) = let
val n = length lps
@@ -413,9 +413,10 @@
val unit = E#"(" >>> parens (E#")")
fun C0 c = C c (return ())
fun C1 c t = C c (ignored >> t)
- fun data t = parens (longId >>= (fn s => case t (String.concatWith "." s)
- of NONE => zero
- | SOME p => p))
+ fun data t =
+ parens (parens longId >>= (fn s => case t (String.concatWith "." s)
+ of NONE => zero
+ | SOME p => p))
val Y = Tie.function
More information about the MLton-commit
mailing list