From f0bbe766b9cfd14f09e847519b84cf7025839486 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 28 Dec 2010 07:40:30 +0000 Subject: Use fst ("first") instead of head and rst ("rest") instead of tail. git-svn-id: http://svn.drobilla.net/resp/resp@366 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/constrain.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/constrain.cpp') diff --git a/src/constrain.cpp b/src/constrain.cpp index f65ad8f..7530f01 100644 --- a/src/constrain.cpp +++ b/src/constrain.cpp @@ -52,7 +52,7 @@ constrain_cons(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error) THROW_IF(!consTRef, call->loc, (format("call to undefined constructor `%1%'") % sym->sym()).str()); const AST* consT = *consTRef; - type = new ATuple(consT->as_tuple()->head(), 0, call->loc); + type = new ATuple(consT->as_tuple()->fst(), 0, call->loc); } c.constrain(tenv, call, type); } @@ -246,7 +246,7 @@ constrain_match(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error) const AST* consT = *tenv.ref(name); if (!matcheeT) { - const AST* headT = consT->as_tuple()->head(); + const AST* headT = consT->as_tuple()->fst(); matcheeT = new ATuple(headT, 0, call->loc); } @@ -273,7 +273,7 @@ constrain_quote(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error) static void constrain_call(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error) { - const AST* const head = call->head(); + const AST* const head = call->fst(); for (ATuple::const_iterator i = call->begin(); i != call->end(); ++i) resp_constrain(tenv, c, *i); @@ -300,7 +300,7 @@ constrain_call(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error) static void constrain_primitive(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error) { - const string n = call->head()->to_symbol()->str(); + const string n = call->fst()->to_symbol()->str(); enum { ARITHMETIC, BINARY, LOGICAL, COMPARISON } type; if (n == "+" || n == "-" || n == "*" || n == "/") type = ARITHMETIC; @@ -356,7 +356,7 @@ constrain_primitive(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error) static void constrain_list(TEnv& tenv, Constraints& c, const ATuple* tup) throw(Error) { - const ASymbol* const sym = tup->head()->to_symbol(); + const ASymbol* const sym = tup->fst()->to_symbol(); if (!sym) { constrain_call(tenv, c, tup); return; -- cgit v1.2.1