You can infer the required type of 'f' from its use.

You can also infer the defined type of f from its definition.

You can treat this compositionally, so when two program fragments are
composed, you match the requirements from one fragment against the
definitions from the other.

You can see an implementation of this here:

https://github.com/keean/Compositional-Typing-Inference

This also has principal typings, and can give types for open fragments.

Keean.
On 12 Feb 2015 08:46, "William ML Leslie" <[email protected]>
wrote:

> On 12 February 2015 at 19:27, Matt Oliveri <[email protected]> wrote:
>
>> I'm not sure what you're saying we should infer for the (f x y)
>> example. That could either be a 2-application, or two 1-applications,
>> if they had the same syntax. That's why I proposed writing two
>> 1-applications like ((f x) y).
>>
>
> Calling convention is a property of a value (of f), rather than of an
> application.  A value supports one native arity, although it can be
> converted to another.
>
> --
> William Leslie
>
> Notice:
> Likely much of this email is, by the nature of copyright, covered under
> copyright law.  You absolutely MAY reproduce any part of it in accordance
> with the copyright law of the nation you are reading this in.  Any attempt
> to DENY YOU THOSE RIGHTS would be illegal without prior contractual
> agreement.
>
> _______________________________________________
> bitc-dev mailing list
> [email protected]
> http://www.coyotos.org/mailman/listinfo/bitc-dev
>
>
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to