aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-26 19:32:04 +0000
committerDavid Robillard <d@drobilla.net>2010-12-26 19:32:04 +0000
commitd9ced5e07ec20f47bd2743f93f84438ac3eb4c6a (patch)
tree529206f6e46c25c7df2c78a9a74520c53befacd1
parent7644fe32e7dd926ef5d1db7d5eec20225f790144 (diff)
downloadresp-d9ced5e07ec20f47bd2743f93f84438ac3eb4c6a.tar.gz
resp-d9ced5e07ec20f47bd2743f93f84438ac3eb4c6a.tar.bz2
resp-d9ced5e07ec20f47bd2743f93f84438ac3eb4c6a.zip
Remove apparently unnecessary concrete_type.
git-svn-id: http://svn.drobilla.net/resp/resp@356 ad02d1e2-f140-0410-9f75-f8b11f17cedd
-rw-r--r--src/resp.hpp20
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;