[ghc-steering-committee] Discussion about "Type Application in Patterns" (#126)
Richard Eisenberg
rae at cs.brynmawr.edu
Sun Aug 19 01:32:10 UTC 2018
So what's the new rule? Is it:
- @ denotes a type application if it is preceded by a non-identifier character and succeeded by a non-whitespace character
- @ denotes an as-pattern if is preceded by an identifier character or succeeded by a whitespace character
This means that `f@ Int` is an as-pattern.
I think the new rule just adds another twist to an already too-complicated plot.
I'm not worried about backward-compat issues here (echoing Joachim's sentiments) but I don't see the advantage to this new spec.
Richard
> On Aug 17, 2018, at 1:27 PM, Joachim Breitner <mail at joachim-breitner.de> wrote:
>
> Hi,
>
> Am Freitag, den 17.08.2018, 13:00 -0400 schrieb Eric Seidel:
>> I've always thought of "@Int" as a single syntactic unit, so I'd be happy to disallow spaces between the @ and the type.
>
> not opposed in principle, but if we go that route, it should also apply
> to type applications in expressions, for consistency. Are we willing to
> potentially break code out there? (Well, it’s an extension, the fix is
> simple and fully backward-compatible, and most people probably got it
> right in the first place, so maybe breaking is not too bad.)
>
> Cheers,
> Joachim
>
>
> --
> Joachim Breitner
> mail at joachim-breitner.de
> http://www.joachim-breitner.de/
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
More information about the ghc-steering-committee
mailing list