On Tue, Jan 13, 2004 at 12:44:10PM +0100, Stefan Holdermans wrote:
> Hi,
> 
> I'm using the Parsec library to parse strings for a small experimental
> language. I'd like to decorate each node in the abstract syntax tree with
> a pair (Int, Int) that represents the line and column number in the
> strings. Unfortunately, the SourcePos class in the Parsec library is
> abstract and I cannot extract the line and column numbers from a SourcePos
> value. What are my options?

What about these?

  type Column = Int
  type Line = Int

  sourceColumn :: SourcePos -> Column
  sourceLine :: SourcePos -> Line

Regards,
Tomasz

-- 
.signature: Too many levels of symbolic links
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to