diff options
Diffstat (limited to 'src/pprint.cpp')
-rw-r--r-- | src/pprint.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pprint.cpp b/src/pprint.cpp index bbb4904..ff19331 100644 --- a/src/pprint.cpp +++ b/src/pprint.cpp @@ -37,7 +37,7 @@ newline(ostream& out, unsigned indent) static inline void print_annotation(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool print) { - if (is_form(ast, "def")) + if (is_form(ast, "define")) return; if (print) { @@ -143,8 +143,8 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types) out << " "; } - if (form == "def") { - if (tup->rrst() && is_form(tup->frrst(), "fn")) { + if (form == "define") { + if (tup->rrst() && is_form(tup->frrst(), "lambda")) { // Abreviate (def (fn (...) ...)) out << "(" << (*i++) << " "; const ATuple* const fn = tup->frrst()->as_tuple(); @@ -179,7 +179,7 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types) newline(out, indent + 2); print_list(out, tup, i, indent + 2, cenv, types, false); - } else if (form == "fn") { + } else if (form == "lambda") { // Print prototype (possibly with parameter type annotations) const ATuple* pat = (*i++)->as_tuple(); out << "("; @@ -266,7 +266,7 @@ pprint(ostream& out, const AST* ast, CEnv* cenv, bool types) print_to(out, ast, 0, cenv, types); print_annotation(out, ast, 0, cenv, types); out << endl; - if ((is_form(ast, "def") && is_form(ast->as_tuple()->frrst(), "fn")) + if ((is_form(ast, "define") && is_form(ast->as_tuple()->frrst(), "lambda")) || is_form(ast, "fn-end") || is_form(ast, "def-type")) out << endl; |