diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/simplify.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/simplify.cpp b/src/simplify.cpp index e27049a..c5b2566 100644 --- a/src/simplify.cpp +++ b/src/simplify.cpp @@ -78,11 +78,7 @@ simplify_match(CEnv& cenv, const ATuple* match) throw() const_cast<ASymbol*>(consTag)->tag(T_LITSYM); cenv.setType(consTag, cenv.tenv.named("Symbol")); - List cond; - cond.push_back(cenv.penv.sym("=")); - cond.push_back(tsym); - cond.push_back(consTag); - + List cond(Cursor(), cenv.penv.sym("="), tsym, consTag, 0); cenv.setType(cond, cenv.tenv.named("Bool")); copyIf.push_back(cond); @@ -91,10 +87,7 @@ simplify_match(CEnv& cenv, const ATuple* match) throw() copyIf.push_back(cenv.penv.sym("__unreachable")); cenv.setTypeSameAs(copyIf, match); - List copy; - copy.push_back(cenv.penv.sym("do")); - copy.push_back(def); - copy.push_back(simplify_if(cenv, copyIf)); + List copy(match->loc, cenv.penv.sym("do"), def.head, simplify_if(cenv, copyIf), 0); cenv.setTypeSameAs(copy, match); return copy; |