diff options
-rw-r--r-- | src/resp.hpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/resp.hpp b/src/resp.hpp index 5cb11b6..bde4bcf 100644 --- a/src/resp.hpp +++ b/src/resp.hpp @@ -367,22 +367,6 @@ struct AType : public ATuple { unsigned id; }; -static bool concrete_type(const AType* type) { - switch (type->kind) { - case AType::VAR: return false; - case AType::NAME: return false; - case AType::PRIM: return type->head()->str() != "Nothing"; - case AType::EXPR: - FOREACHP(AType::const_iterator, t, type) { - const AType* kid = (*t)->to_type(); - if (kid && !concrete_type(kid)) - return false; - } - case AType::DOTS: return false; - } - return true; -} - // Utility class for easily building lists from left to right template<typename CT, typename ET> // ConsType, ElementType struct List { @@ -607,8 +591,8 @@ struct Subst : public list<Constraint> { const_iterator i = find(in); if (i != end()) { const AType* out = i->second->as_type(); - if (out->kind == AType::EXPR && !concrete_type(out)) - out = apply(out->as_type()); + if (out->kind == AType::EXPR) + out = apply(out); return out; } else { return in; |