diff options
Diffstat (limited to 'src/pprint.cpp')
-rw-r--r-- | src/pprint.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/pprint.cpp b/src/pprint.cpp index 5d03c78..80f854c 100644 --- a/src/pprint.cpp +++ b/src/pprint.cpp @@ -136,6 +136,12 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool 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) const ATuple* pat = (*i++)->as_tuple(); @@ -149,17 +155,6 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types) } else if (form == "if") { print_list(out, tup, i, indent + 4, cenv, types, true); - } else if (form == "match") { - out << (*i++); - newline(out, indent + 2); - print_list(out, tup, i, indent + 2, cenv, types, true); - - } 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 == "let") { out << "("; const ATuple* vars = (*i)->as_tuple(); @@ -181,6 +176,11 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types) if (types) out << " :" << cenv->tsubst.apply(cenv->tenv.var(tup->list_last())); + } else if (form == "match") { + out << (*i++); + newline(out, indent + 2); + print_list(out, tup, i, indent + 2, cenv, types, true); + } else { print_list_one_line(out, tup, i, indent + 1, cenv, types, false); } |