Hi i'm facing the following problem, i have to re-write an existant code to improve his performances. the old version was using a parser defined like this :
newtype Parser Char a = Parser {runParser :: [Char] -> [(a,[Char])]}
to parse lines from files. but it was too slow and required a lot of memory to achieve the computation upon lines. To improve that code, I decided to use Data.ByteString.Lazy.Char8 instead of String, but i don't know how to deal with the parser, is it possible to defined a parser in this way ?
newtype Parser Char a = parser {runParser :: ByteString -> [(a,ByteString)]} ?
or, is there any parser package dedicate to these kind of work ?
thanks to reply