diff options
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*>()) |