On Tue, Mar 31, 2015 at 11:32 AM, Keean Schupke <[email protected]> wrote:
>
>> Why isn't (f : a b c => d) valid? It unifies with (a->b->c->d), (and
>> therefore (a->b)) doesn't it?
>
> No, it only unifies with (a->b->c->d) not (a->b).
>
> f: a b c => d
>
> requires a minimum of 3 arguments

You are not addressing the "and therefore (a->b)" part. Serves me
right for putting it in parens, I guess. If arrows really work like in
Haskell, then (a->b->c->d) is strictly more specific than (a->b).
Remember, (a->b->c->d) is the same as (a->(b->c->d)) you say, so we've
just instantiated the old b to (b->c->d).

(a->b) cannot rule out (a b c=>d) because (a->b->c->d) doesn't.
Unintuitive as it is, (a->b) doesn't require that the function can be
called with 1 argument. Really HM arrows don't say anything about
arity of calls. That's the problem.

Another way to look at it is that if (a->b) must be callable with 1
arg, then (a->(b->c->d)) must also be callable with 1 arg, so if
that's the same as (a->b->c->d) then your whole scheme trivializes to
curried cfns.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to