[Haskell-cafe] GHC Extension Proposal: ArgumentBlock
Andrew Morris
lists at andy-morris.xyz
Sun Sep 6 14:38:15 UTC 2015
As `f (\x -> x (\y -> y))`.
FWIW, I actually think it strange that these constructs are allowed as an argument to an infix function but not a nonfix one. So it seems to me that it would be _removing_ a weird exception rather than adding one. Assuming we add `let`, `case`, and the other things that can also be an argument to an infix op, that is. (Why are they being excluded, by the way?)
> On 6 Sep 2015, at 14:03, David Kraeutmann <kane at kane.cx> wrote:
>
> It's not something that belongs in an extension. Rather, it should be
> in the main language.
>
> Let's say you want to write f (\x -> x) (\y -> y) and forget the parentheses.
>
> How would you parse the following under ArgumentBlock:
> f \x -> x \y -> y?
>
>
> On Sun, Sep 6, 2015 at 2:45 PM, Tom Ellis
> <tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk> wrote:
>> On Sun, Sep 06, 2015 at 12:34:55PM +0000, Oliver Charles wrote:
>>> People saying "it just saves a character" seems to have completely missed
>>> my point and source code readability/refactoring options from a tool's
>>> perspective. It does more than save a character.
>>
>> Let's look at it from the opposite direction. If "ArgumentBlock" were
>> already the default then we could remove complexity from the grammar for the
>> cost of a single character. That sounds like a great tradeoff to me, and is
>> the reason I can't support ArgumentBlock.
>>
>> Tom
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe
mailing list