diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/constrain.cpp | 6 | ||||
-rw-r--r-- | src/expand.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/constrain.cpp b/src/constrain.cpp index 66b4505..b644833 100644 --- a/src/constrain.cpp +++ b/src/constrain.cpp @@ -113,10 +113,10 @@ constrain_dot(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error) static void constrain_def(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error) { - THROW_IF(call->list_len() != 3, call->loc, "`def' requires exactly 2 arguments"); - THROW_IF(!call->frst()->to_symbol(), call->frst()->loc, "`def' name is not a symbol"); + THROW_IF(call->list_len() != 3, call->loc, "`define' requires exactly 2 arguments"); + THROW_IF(!call->frst()->to_symbol(), call->frst()->loc, "`define' name is not a symbol"); const ASymbol* const sym = call->list_ref(1)->as_symbol(); - THROW_IF(!sym, call->loc, "`def' has no symbol") + THROW_IF(!sym, call->loc, "`define' has no symbol") const AST* const body = call->list_ref(2); const AST* tvar = tenv.var(body); diff --git a/src/expand.cpp b/src/expand.cpp index 72d83cd..7eece67 100644 --- a/src/expand.cpp +++ b/src/expand.cpp @@ -141,8 +141,8 @@ expand_fn(PEnv& penv, const AST* exp) { const ATuple* tup = exp->to_tuple(); ATuple::const_iterator a = tup->begin(); - THROW_IF(++a == tup->end(), exp->loc, "Unexpected end of `fn' form"); - THROW_IF(!(*a)->to_tuple(), (*a)->loc, "First argument of `fn' is not a list"); + THROW_IF(++a == tup->end(), exp->loc, "Unexpected end of `lambda' form"); + THROW_IF(!(*a)->to_tuple(), (*a)->loc, "First argument of `lambda' is not a list"); const ATuple* prot = (*a++)->to_tuple(); List ret(new ATuple(penv.sym("lambda"), NULL, exp->loc)); ret.push_back(prot); @@ -155,7 +155,7 @@ static const AST* expand_def(PEnv& penv, const AST* exp) { const ATuple* tup = exp->as_tuple(); - THROW_IF(tup->list_len() < 3, tup->loc, "`def' requires at least 2 arguments"); + THROW_IF(tup->list_len() < 3, tup->loc, "`define' requires at least 2 arguments"); ATuple::const_iterator i = tup->begin(); const AST* arg1 = *(++i); |