diff --git a/k.krak b/k.krak index 53d5229..595acda 100644 --- a/k.krak +++ b/k.krak @@ -212,7 +212,6 @@ fun main(argc: int, argv: **char): int { } var unify: fun(*binding, *binding): void = fun(t1: *binding, t2: *binding) { - println("trying to unify " + t1->bound_to->to_string() + " and " + t2->bound_to->to_string()) if (t1->bound_to->equality(t2->bound_to, false, false) || t1->bound_to->is_unknown()) t1->set(t2->bound_to) else if (t2->bound_to->is_unknown()) @@ -246,16 +245,16 @@ fun main(argc: int, argv: **char): int { var traverse_for_select: fun(*tree): void = fun(t: *tree) { match (t->data) { ast::_binding(b) if (!t->data._binding.second->bound()) { - println("Attempting to use our inferenced type " + unbound_types[t]->bound_to->to_string() + " to decide what to bind " + to_string(t->data) + " to form options:") var filtered_options = multiple_binding_options[t].filter(fun(p: *tree): bool return unbound_types[t]->bound_to->equality(get_type(p)->bound_to, false, true);) - multiple_binding_options[t].for_each(fun(p: *tree) { - println("\t" + to_string(p->data) + " of type " + get_type(p)->bound_to->to_string()) - }) - if (filtered_options.size == 0) + if (filtered_options.size == 0) { + println("Attempting to use our inferenced type " + unbound_types[t]->bound_to->to_string() + " to decide what to bind " + to_string(t->data) + " to from options:") + multiple_binding_options[t].for_each(fun(p: *tree) { println("\t" + to_string(p->data) + " of type " + get_type(p)->bound_to->to_string()); }) error("no options remain after filtering overloads by type for " + to_string(t->data)) - else if (filtered_options.size > 1) + } else if (filtered_options.size > 1) { + println("Attempting to use our inferenced type " + unbound_types[t]->bound_to->to_string() + " to decide what to bind " + to_string(t->data) + " to form options:") + multiple_binding_options[t].for_each(fun(p: *tree) { println("\t" + to_string(p->data) + " of type " + get_type(p)->bound_to->to_string()); }) error("too many options remain after filtering overloads by type for " + to_string(t->data)) - else + } else set_ast_binding(t, filtered_options[0]) } }