aboutsummaryrefslogtreecommitdiffstats
path: root/src/constrain.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-28 07:40:30 +0000
committerDavid Robillard <d@drobilla.net>2010-12-28 07:40:30 +0000
commitf0bbe766b9cfd14f09e847519b84cf7025839486 (patch)
treef12848bdb6335bbe43abd765d3ddd472ea01b2ca /src/constrain.cpp
parent25e58056dc218afe0768081ef1c52974593773c0 (diff)
downloadresp-f0bbe766b9cfd14f09e847519b84cf7025839486.tar.gz
resp-f0bbe766b9cfd14f09e847519b84cf7025839486.tar.bz2
resp-f0bbe766b9cfd14f09e847519b84cf7025839486.zip
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
Diffstat (limited to 'src/constrain.cpp')
-rw-r--r--src/constrain.cpp10
1 files changed, 5 insertions, 5 deletions
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;