aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pprint.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pprint.cpp b/src/pprint.cpp
index 48debb1..ba29e3b 100644
--- a/src/pprint.cpp
+++ b/src/pprint.cpp
@@ -144,13 +144,11 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types)
out << " ";
print_to(out, *i++, child_indent, cenv, types);
out << ")";
- newline(out, 0);
} else if (form == "def-type") {
out << (*i++);
newline(out, indent + 2);
print_list(out, tup, i, indent + 2, cenv, types, false);
- newline(out, 0);
} else if (form == "fn") {
// Print prototype (possibly with parameter type annotations)
@@ -205,6 +203,9 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types)
// Print on single line if list contains only atoms
print_list_one_line(out, tup, i, indent + head_width, cenv, types, false);
}
+ if (indent == 0)
+ newline(out, 0);
+
return out;
}
case T_BOOL: