diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pprint.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pprint.cpp b/src/pprint.cpp index a4e493c..92898ac 100644 --- a/src/pprint.cpp +++ b/src/pprint.cpp @@ -126,10 +126,13 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types) if (form == "def") { out << (*i++) << " "; // Print symbol - if (types) + unsigned child_indent = types ? indent + 2 : indent; + if (types) { out << ":" << cenv->type(tup->list_ref(2)) << " "; + newline(out, child_indent); + } - print_to(out, (*i++), indent, cenv, types); + print_to(out, (*i++), child_indent, cenv, types); out << ")"; newline(out, 0); |