
13 May
2014
13 May
'14
10:32 p.m.
On Tue, May 13, 2014 at 03:11:16PM -0700, John Meacham wrote:
ah cool, can you point me to which file it is implemented in in the source so I can copy your new rules?
It's lexTokenAlr and friends in compiler/parser/Lexer.x It's a while since I looked at it, but IIRC it's not as clean to read as your specification code was, as GHC needs a function that it can call that will just give it the next token. That means that we need to keep some state for what we've recently seen, and if we want to return multiple tokens then we can only return the first one, and need to store the rest to be returned by subsequent calls Thanks Ian