From d9ced5e07ec20f47bd2743f93f84438ac3eb4c6a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 26 Dec 2010 19:32:04 +0000 Subject: Remove apparently unnecessary concrete_type. git-svn-id: http://svn.drobilla.net/resp/resp@356 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/resp.hpp | 20 ++------------------ 1 file 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 // ConsType, ElementType struct List { @@ -607,8 +591,8 @@ struct Subst : public list { 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; -- cgit v1.2.1