aboutsummaryrefslogtreecommitdiffstats
path: root/src/lift.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lift.cpp')
-rw-r--r--src/lift.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lift.cpp b/src/lift.cpp
index 3f0e1bf..f5fe607 100644
--- a/src/lift.cpp
+++ b/src/lift.cpp
@@ -47,7 +47,7 @@ AFn::lift(CEnv& cenv)
void
ACall::lift(CEnv& cenv)
{
- AFn* c = cenv.resolve(at(0))->to<AFn*>();
+ AFn* c = cenv.resolve(head())->to<AFn*>();
AType argsT(loc);
// Lift arguments
@@ -59,9 +59,9 @@ ACall::lift(CEnv& cenv)
if (!c) return; // Primitive
if (c->prot()->size() < size() - 1)
- throw Error(loc, (format("too many arguments to function `%1%'") % at(0)->str()).str());
+ throw Error(loc, (format("too many arguments to function `%1%'") % head()->str()).str());
if (c->prot()->size() > size() - 1)
- throw Error(loc, (format("too few arguments to function `%1%'") % at(0)->str()).str());
+ throw Error(loc, (format("too few arguments to function `%1%'") % head()->str()).str());
cenv.engine()->compileFunction(cenv, c, argsT); // Lift called closure
}