On Mon, Feb 16, 2015 at 3:54 PM, Geoffrey Irving <[email protected]> wrote: > On Mon, Feb 16, 2015 at 12:49 PM, Jonathan S. Shapiro <[email protected]> > wrote: >> Per the previous summary, one option we are still considering is: >> >> 1) Functions take N>0 argument patterns and return 1 result. Such functions >> have arity N. >> 2) The type of a function is written as something like fn ty1 ty2 ... tyN -> >> result >> 3) We adopt a surface syntax for function call that appears curried, in that >> no parentheses or commas are involved in the application syntax. >> >> In this scenario, we have adequate information at the definition site and in >> the written form of the type to determine what the arity must be, but we do >> NOT have enough information at the application site. Given a procedure: >> >> def perverse f a b = f a b >> >> we cannot determine whether f has type fn 'a -> (fn 'b -> 'c) or >> alternatively has type fn 'a 'b -> 'c > > I believe that in Matt's proposal, we do know the arity of f in this > case: it's 2. f is applied to two arguments, so it must have type fn > a b -> c.
Yeah. _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
