On Tue, Mar 31, 2015 at 12:41 AM, Keean Schupke <[email protected]> wrote:

> > > My intention is that the 'usual' arrow is arity-abstract, and the
> semantics
>
> > > and type system behaviour is the same as in Haskell or other functional
> > > languages.
> >
> > Thanks. But then you really are missing information that seems
> > necessary. For a concrete example where this could be a problem, see
> > my other email just now. Or Shap's email just now, with essentially
> > the same example.
>
> I think you are missing that the input language supports both arity
> abstract and arity concrete functions. For example, using my notation :
>
> f : ('a 'b => 'c) -> 'a -> 'b -> 'c
>
> Which I think Shap would write:
>
> f : afn ? (cfn ['a 'b] -> 'c) -> 'a -> 'b -> 'c
>
> Or something like that, I find it confusing, and I'm not quite sure...
>

Perhaps, in part, because the ? in your attempt needs an identifier,
because it's an arity type variable. I don't like this notation either.

I'm still not sure what type you infer when you see both of the following
applications within a procedure body:

f a b
f a b c d

We know here that there must be a possible "call" after the second
parameter, and another after the fourth parameter. But we do NOT know that
f actually takes two arguments (that is: f is still arity abstract). In
fact, based on what we infer here, no arity-concrete function type can be
inferred yet. What type does your approach assign to f here?


Jonathan
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to