8 ms·
Ah, attoparsec is such a nice package! Some minor quibbles: Why aren't you using the various combinators from Control.Applicative to build your parsers? Could
by msds 15y ago
Ah, attoparsec is such a nice package!
Some minor quibbles:
Why aren't you using the various combinators from Control.Applicative to build your parsers?
Could your log files possibly contain non-ascii characters? In that case, use the attoparsec module specialized for Data.Text values.
- msds 15y agoAlso, your experimentation with manually defined satisfy vs the char combinator was interesting - I wouldn't have expected satisfy to be any faster, but it definitely is. The internal definition of char is "char c = satisfy (== c) <?> [c]"
- shintoist 15y agoThe reason I didn't use applicative is because I wasn't comfortable with it at the time. You can write some pretty nice looking code with applicative, but you also have to get used to it first. My hope is that by sticking to do-notation more people will be able to read it =)