... Make parse tree types with postions in them an instance of HasPos . The ABR.Parser module provides a framework for lexical analysis and parsing using parser combinators [3,4]. module ABR.Parser ( Msg, Could(Fail, Error, OK), Analyser, succeedA, epsilonA, failA, errorA, ( <|> ), ( <*> ), ( @> ), ( #> ), cons, some, many, optional, someUntil, manyUntil, ( *> ), ( <* ), alsoSat, alsoNotSat, dataSatisfies, dataSatisfies ', total, nofail, nofail', preLex, Lexeme, Tag, Lexer, TLP, TLPs, satisfyL, literalL, ( %> ), ( <**> ), ( <++> ), ( *%> ), soft, tagFilter, tokenL, endL, listL, Parser, tagP, lineNo, literalP, errMsg, warnMsg ) where ...