diff --git a/prototype/Doubt/Diff.swift b/prototype/Doubt/Diff.swift index b47eccdcd..bb6d348da 100644 --- a/prototype/Doubt/Diff.swift +++ b/prototype/Doubt/Diff.swift @@ -31,8 +31,8 @@ public enum Diff: Comparable, CustomDebugStringConvertible, CustomDocConvertible case let .Copy(a): return a.doc case let .ByKey(a, b): - return a.keys.sort().map { Doc($0) <> Doc(":") <+> Doc(a[$0]!) }.stack().bracket("{-", "-}") - <> b.keys.sort().map { Doc($0) <> Doc(":") <+> Doc(b[$0]!) }.stack().bracket("{+", "+}") + return a.keys.sort().map { Doc($0) <> Doc(":") <+> Doc(a[$0]!) }.joinWithSeparator(",").bracket("{-", "-}") + <> b.keys.sort().map { Doc($0) <> Doc(":") <+> Doc(b[$0]!) }.joinWithSeparator(",").bracket("{+", "+}") } } diff --git a/prototype/Doubt/Syntax.swift b/prototype/Doubt/Syntax.swift index c140b0bcd..fa2fe1ccf 100644 --- a/prototype/Doubt/Syntax.swift +++ b/prototype/Doubt/Syntax.swift @@ -79,7 +79,7 @@ public enum Syntax: CustomDebugStringConvertible, CustomDocConvertible case let .Leaf(n): return Doc(n) case let .Branch(vs): - return vs.map(Doc.init).stack().bracket("{", "}") + return vs.map(Doc.init).joinWithSeparator(",").bracket("{", "}") } } }