On Mon, Feb 16, 2015 at 11:21 PM, Matt Oliveri <[email protected]> wrote: > On Tue, Feb 17, 2015 at 1:44 AM, Geoffrey Irving <[email protected]> wrote: >> On Mon, Feb 16, 2015 at 10:32 PM, Matt Oliveri <[email protected]> wrote: >>> I think the "fn" is really ugly and I'd like to talk about whether >>> it's needed, and if so, what we can do instead. >> >> I don't believe "fn" is needed in terms of grammar ambiguity. It >> doesn't generate ambiguity in terms of general CFGs, and even if we >> were to restrict ourselves to a LALR(1) parser the "a b c -> d" syntax >> can be parsed by treated it as arity 1 and then unwrapping any bare >> juxtapositions on the left hand side. > > What occurred to me is that unless we enforce a naming convention, "a > b c -> d" could mean ((a b c) -> d), thinking "a" will turn out to be > a type constructor. We could do something like with term-level > application, and require parens to force parsing "a b c" as a > constructor application before "->".
Yes, you need parens or some such to get constructors, but that's orthogonal to fn. "fn a b c -> d" for "a" a constructor is no more or less ambiguous than "a b c -> d" for "a" a constructor. Geoffrey _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
