diff options
author | David Robillard <d@drobilla.net> | 2009-10-06 16:06:04 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-10-06 16:06:04 +0000 |
commit | caff973778f806125cf32d20de8914ace7345282 (patch) | |
tree | d861083d4dc38ae0ec92c4034fa7b309d02f48b2 /src | |
parent | c8c4f52cc9130a349be2cefd4a3199729bef1bb9 (diff) | |
download | resp-caff973778f806125cf32d20de8914ace7345282.tar.gz resp-caff973778f806125cf32d20de8914ace7345282.tar.bz2 resp-caff973778f806125cf32d20de8914ace7345282.zip |
Don't print the value/type of def expressions at repl.
(Give def expressions the type Nothing).
git-svn-id: http://svn.drobilla.net/resp/tuplr@188 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src')
-rw-r--r-- | src/constrain.cpp | 3 | ||||
-rw-r--r-- | src/repl.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/constrain.cpp b/src/constrain.cpp index 7db25fa..0581115 100644 --- a/src/constrain.cpp +++ b/src/constrain.cpp @@ -163,7 +163,8 @@ ADef::constrain(TEnv& tenv, Constraints& c) const AType* tvar = tenv.var(at(2)); tenv.def(sym, make_pair(const_cast<AST*>(at(2)), tvar)); at(2)->constrain(tenv, c); - c.constrain(tenv, this, tvar); + c.constrain(tenv, at(1), tvar); + c.constrain(tenv, this, tenv.named("Nothing")); } void diff --git a/src/repl.cpp b/src/repl.cpp index bca6037..fc7b6ec 100644 --- a/src/repl.cpp +++ b/src/repl.cpp @@ -133,7 +133,8 @@ repl(CEnv& cenv) cenv.out << "?"; cenv.engine()->eraseFunction(cenv, f); } - cenv.out << " : " << cenv.type(body) << endl; + if (bodyT->at(0)->to<const ASymbol*>()->cppstr != "Nothing") + cenv.out << " : " << cenv.type(body) << endl; // Add definitions as GC roots if (body->to<ADef*>()) |