aboutsummaryrefslogtreecommitdiffstats
path: root/typing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'typing.cpp')
-rw-r--r--typing.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/typing.cpp b/typing.cpp
index 3b14a1f..06b936e 100644
--- a/typing.cpp
+++ b/typing.cpp
@@ -228,40 +228,6 @@ APrimitive::constrain(TEnv& tenv, Constraints& c) const
}
}
-void
-AConsCall::constrain(TEnv& tenv, Constraints& c) const
-{
- THROW_IF(size() != 3, loc, "`cons' requires exactly 2 arguments")
- AType* t = new AType(loc, tenv.penv.sym("Pair"), 0);
- for (size_t i = 1; i < size(); ++i) {
- at(i)->constrain(tenv, c);
- t->push_back(tenv.var(at(i)));
- }
- c.constrain(tenv, this, t);
-}
-
-void
-ACarCall::constrain(TEnv& tenv, Constraints& c) const
-{
- THROW_IF(size() != 2, loc, "`car' requires exactly 1 argument")
- at(1)->constrain(tenv, c);
- AType* carT = tenv.var(this);
- AType* pairT = new AType(at(1)->loc, tenv.penv.sym("Pair"), carT, tenv.var(), 0);
- c.constrain(tenv, at(1), pairT);
- c.constrain(tenv, this, carT);
-}
-
-void
-ACdrCall::constrain(TEnv& tenv, Constraints& c) const
-{
- THROW_IF(size() != 2, loc, "`cdr' requires exactly 1 argument")
- at(1)->constrain(tenv, c);
- AType* cdrT = tenv.var(this);
- AType* pairT = new AType(at(1)->loc, tenv.penv.sym("Pair"), tenv.var(), cdrT, 0);
- c.constrain(tenv, at(1), pairT);
- c.constrain(tenv, this, cdrT);
-}
-
/***************************************************************************
* Type Inference/Substitution *