[Haskell-cafe] parsec - source position information

2011-04-07 Thread Ozgur Akgun
Hi, Is there a way to get source position[1] information from parsec while defining a parser? It surely knows about source positions, as they are used while reporting a parsing error. data Identifier = Identifier String SourcePos pIdentifier :: Parser Identifier pIdentifier = do pos - ??

Re: [Haskell-cafe] parsec - source position information

2011-04-07 Thread Christopher Done
On 7 April 2011 17:22, Ozgur Akgun ozgurak...@gmail.com wrote: Is there a way to get source position[1] information from parsec while defining a parser? It surely knows about source positions, as they are used while reporting a parsing error.

Re: [Haskell-cafe] parsec - source position information

2011-04-07 Thread Daniel Fischer
On Thursday 07 April 2011 17:22:56, Ozgur Akgun wrote: Hi, Is there a way to get source position[1] information from parsec while defining a parser? It surely knows about source positions, as they are used while reporting a parsing error. data Identifier = Identifier String SourcePos

Re: [Haskell-cafe] parsec - source position information

2011-04-07 Thread Ozgur Akgun
Thanks! On 7 April 2011 16:27, Christopher Done chrisd...@googlemail.com wrote: On 7 April 2011 17:22, Ozgur Akgun ozgurak...@gmail.com wrote: Is there a way to get source position[1] information from parsec while defining a parser? It surely knows about source positions, as they are used