[Haskell-cafe] Alex Lexer: Trying to get rid of "Alex"

Amit Deshwar amit.deshwar at gmail.com
Tue Feb 23 04:15:48 EST 2010

Hi Haskell-cafe

My problem:  I'm trying to obtain the current position of the lexer once it
reaches the end of the file (line and row number).
I'm trying to do this in a function:

getEndPosition = do
  (a,b,c) <- alexGetInput
  return a

Unfortunately, the type of a is 'Alex AlexPosn' instead of just 'AlexPosn'
How do I strip the Alex so I'm left with just a AlexPosn object?


Amit Deshwar
University of Calgary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100223/6986b95f/attachment.html

More information about the Haskell-Cafe mailing list