diff options
author | David Robillard <d@drobilla.net> | 2012-12-27 18:15:43 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-12-27 18:15:43 +0000 |
commit | 01a458a33f3329a254206b6bbe858542d7634ca4 (patch) | |
tree | 904be7fcaebc0039e3bc48d693325e0108dee039 /src | |
parent | 72f0c3c64ccde328b1d592d2d741811a33408060 (diff) | |
download | resp-01a458a33f3329a254206b6bbe858542d7634ca4.tar.gz resp-01a458a33f3329a254206b6bbe858542d7634ca4.tar.bz2 resp-01a458a33f3329a254206b6bbe858542d7634ca4.zip |
Remove unused constrain_let.
git-svn-id: http://svn.drobilla.net/resp/trunk@452 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src')
-rw-r--r-- | src/constrain.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/constrain.cpp b/src/constrain.cpp index b644833..069384a 100644 --- a/src/constrain.cpp +++ b/src/constrain.cpp @@ -227,37 +227,6 @@ constrain_if(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error) } static void -constrain_let(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error) -{ - THROW_IF(call->list_len() < 3, call->loc, "`let' requires at least 2 arguments"); - const ATuple* vars = call->list_ref(1)->to_tuple(); - THROW_IF(!vars, call->list_ref(1)->loc, "first argument of `let' is not a list"); - - TEnv::Frame frame; - for (ATuple::const_iterator i = vars->begin(); i != vars->end(); ++i) { - const ASymbol* sym = (*i)->to_symbol(); - THROW_IF(!sym, (*i)->loc, "`let' binding name is not a symbol"); - ATuple::const_iterator val = ++i; - THROW_IF(val == vars->end(), sym->loc, "`let' variable missing value"); - - resp_constrain(tenv, c, *val); - const AST* tvar = tenv.var(*val); - frame.push_back(make_pair(sym->sym(), tvar)); - c.constrain(tenv, sym, tvar); - //c.constrain(tenv, *val, tvar); - } - - tenv.push(frame); - - for (ATuple::const_iterator i = call->iter_at(2); i != call->end(); ++i) - resp_constrain(tenv, c, *i); - - c.constrain(tenv, call, tenv.var(call->list_last())); - - tenv.pop(); -} - -static void constrain_match(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error) { THROW_IF(call->list_len() < 5, call->loc, "`match' requires at least 4 arguments"); @@ -445,8 +414,6 @@ constrain_list(TEnv& tenv, Constraints& c, const ATuple* tup) throw(Error) constrain_fn(tenv, c, tup); else if (form == "if") constrain_if(tenv, c, tup); - else if (form == "let") - constrain_let(tenv, c, tup); else if (form == "match") constrain_match(tenv, c, tup); else if (form == "quote") |