aboutsummaryrefslogtreecommitdiffstats
path: root/src/repl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-06-29 01:07:02 +0000
committerDavid Robillard <d@drobilla.net>2009-06-29 01:07:02 +0000
commit8aa28fc6f34208ce3562dd8edcbecd028a61fd17 (patch)
tree770a48f5a498d8c915bfb881804ca4f541e6b3c1 /src/repl.cpp
parentf5ea52df50d4b199904c42cadff3917621f336db (diff)
downloadresp-8aa28fc6f34208ce3562dd8edcbecd028a61fd17.tar.gz
resp-8aa28fc6f34208ce3562dd8edcbecd028a61fd17.tar.bz2
resp-8aa28fc6f34208ce3562dd8edcbecd028a61fd17.zip
More documentation fixes.
git-svn-id: http://svn.drobilla.net/resp/tuplr@167 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/repl.cpp')
-rw-r--r--src/repl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/repl.cpp b/src/repl.cpp
index df85293..1ec1834 100644
--- a/src/repl.cpp
+++ b/src/repl.cpp
@@ -26,6 +26,7 @@
using namespace std;
+/// Compile and evaluate code from @a is
int
eval(CEnv& cenv, const string& name, istream& is)
{
@@ -42,7 +43,7 @@ eval(CEnv& cenv, const string& name, istream& is)
result = cenv.penv.parse(exp); // Parse input
Constraints c;
result->constrain(cenv.tenv, c); // Constrain types
- cenv.tsubst = Subst::compose(cenv.tsubst, TEnv::unify(c)); // Solve type constraints
+ cenv.tsubst = Subst::compose(cenv.tsubst, unify(c)); // Solve type constraints
resultType = cenv.type(result);
result->lift(cenv); // Lift functions
exprs.push_back(make_pair(exp, result));
@@ -91,6 +92,7 @@ eval(CEnv& cenv, const string& name, istream& is)
return 0;
}
+/// Read Eval Print Loop
int
repl(CEnv& cenv)
{
@@ -109,7 +111,7 @@ repl(CEnv& cenv)
body->constrain(cenv.tenv, c); // Constrain types
Subst oldSubst = cenv.tsubst;
- cenv.tsubst = Subst::compose(cenv.tsubst, TEnv::unify(c)); // Solve type constraints
+ cenv.tsubst = Subst::compose(cenv.tsubst, unify(c)); // Solve type constraints
AType* bodyT = cenv.type(body);
THROW_IF(!bodyT, cursor, "call to untyped body")