diff options
Diffstat (limited to 'src/pprint.cpp')
-rw-r--r-- | src/pprint.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pprint.cpp b/src/pprint.cpp index ddbd403..1632f02 100644 --- a/src/pprint.cpp +++ b/src/pprint.cpp @@ -48,7 +48,7 @@ operator<<(ostream& out, const AST* ast) if (type) { switch (type->kind) { case AType::VAR: return out << "?" << type->id; - case AType::PRIM: return out << type->at(0); + case AType::PRIM: return out << type->head(); case AType::EXPR: break; // will catch Tuple case below } } @@ -69,10 +69,10 @@ pprint_internal(ostream& out, const AST* ast, unsigned indent) { const ATuple* tup = ast->to<const ATuple*>(); if (tup && tup->size() > 0) { - const string head = tup->at(0)->str(); - const ASymbol* headSym = tup->at(0)->to<const ASymbol*>(); + const string head = tup->head()->str(); + const ASymbol* headSym = tup->head()->to<const ASymbol*>(); out << "("; - pprint_internal(out, tup->at(0), indent); + pprint_internal(out, tup->head(), indent); unsigned child_indent = indent; if (tup->size() > 1) { out << " "; |