aboutsummaryrefslogtreecommitdiffstats
path: root/src/constrain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/constrain.cpp')
-rw-r--r--src/constrain.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/constrain.cpp b/src/constrain.cpp
index 83a027a..e6e81a3 100644
--- a/src/constrain.cpp
+++ b/src/constrain.cpp
@@ -135,7 +135,7 @@ constrain_def_type(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error)
THROW_IF(!prot, (*i)->loc, "first argument of `def-type' is not a tuple");
const ASymbol* sym = (*prot->begin())->as_symbol();
THROW_IF(!sym, (*prot->begin())->loc, "type name is not a symbol");
- THROW_IF(tenv.ref(sym), call->loc, "type redefinition");
+ //THROW_IF(tenv.ref(sym), call->loc, "type redefinition");
List type(call->loc, tenv.penv.sym("Lambda"), prot->rst(), NULL);
for (ATuple::const_iterator i = call->iter_at(2); i != call->end(); ++i) {
const ATuple* exp = (*i)->as_tuple();
@@ -306,11 +306,10 @@ resp_constrain_quoted(TEnv& tenv, Constraints& c, const AST* ast) throw(Error)
if (ast->tag() == T_SYMBOL) {
c.constrain(tenv, ast, tenv.named("Symbol"));
} else if (ast->tag() == T_TUPLE) {
- List tupT(new ATuple(tenv.List, NULL, ast->loc));
+ List tupT(new ATuple(tenv.Expr, NULL, ast->loc));
const ATuple* tup = ast->as_tuple();
const AST* fstT = tenv.var(tup->fst());
- tupT.push_back(tenv.penv.sym("Expr"));
c.constrain(tenv, ast, tupT);
c.constrain(tenv, tup->fst(), fstT);
FOREACHP(ATuple::const_iterator, i, ast->as_tuple()) {
@@ -327,7 +326,8 @@ constrain_quote(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error)
{
THROW_IF(call->list_len() != 2, call->loc, "`quote' requires exactly 1 argument");
resp_constrain_quoted(tenv, c, call->frst());
- c.constrain(tenv, call, tenv.var(call->frst()));
+ List type(call->loc, tenv.Expr, NULL);
+ c.constrain(tenv, call, type);
}
static void