[ghc-steering-committee] #344: Negative Literals Improved, rec: accept
Joachim Breitner
mail at joachim-breitner.de
Wed Jul 22 12:43:07 UTC 2020
Hi,
I guess someone needs to respond here :-)
Am Mittwoch, den 15.07.2020, 09:37 -0700 schrieb Iavor Diatchki:
> I understand the problem, but let me make sure I understand the
> solution, as the proposal is rather terse and refers to the other
> proposal, that introduces the exotic lexing scheme.
>
> So am I right in understanding that `f-1` will lex as `f - 1`, but `f
> -1` will lext as `f (-1)`? The reason this would work like that is
> because the "white space" token before the `-` is not "closing" and
> so we know to parse a negative literal.
That is my understanding. Does that affect your verdict here?
> Just as a note, I never quite understood how we plan to implement
> #229---is it supposed to be done through state in the lexer, or do we
> have a simple lexer that keeps all tokens, including white space, and
> then write a post-processing function to glue and rejigger tokens?
No idea here.
Cheers,
Joachim
--
Joachim Breitner
mail at joachim-breitner.de
http://www.joachim-breitner.de/
More information about the ghc-steering-committee
mailing list