diff options
Diffstat (limited to 'src/constrain.cpp')
-rw-r--r-- | src/constrain.cpp | 10 |
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; |