Source

attoparsec / Data / Attoparsec / Text / Internal.hs

Author Commit Message Labels Comments Date
Bryan O'Sullivan
Try using Monoid everywhere
Bryan O'Sullivan
text: use splitAt instead of take&drop
Bryan O'Sullivan
Fix build problem on older GHC
tibbe
Fix exponential compilation times due to inlining Always inlining the success continuation helps performance but explodes the code size so that compiling even small examples such as calling anyWord8 16 times in a row slows to a crawl. Fixes #38
solirc
Use equational constraints for IsString instances This helps with type checking. Here is an example: "foo" *> "bar" :: Parser Text This code did not type check before, because we had an `IsString` instance for `Parser Text`, but all that the type checker can infer about "foo" is that it is of type `Parser a`. The instance I added is now for `Parser a` instead, but we also constrain the type of `a` to `Text`. With this the above code does n…
tibbe
Fix Int overflow in lengthAtLeast In addition, the prior check assumed that the length was in bytes, not Word16s, which made it too conservative.
Bryan O'Sullivan
Merge pull request #28 from tibbe/optimize Several performance improvements
tibbe
Several performance improvements * Ensure the bounds check gets inlined by making ensure non-recursive so it can be inlined. * Avoid creating an extra closure in the common case by inlining the success continuation in ensure. * Optimize lengths check on Text values by using an O(1) conservative check before the exact O(n) check. * Make sure functions that take a high-order predicate argument get inlined to redu…
solirc
Deprecate stringCI
solirc
Add asciiCI, as suggested in #9
solirc
Minor documentation fix
solirc
Fix Haddock markup
Bryan O'Sullivan
Refactor peekWord8 and peekChar. We now check whether there's input before we care whether we've hit EOF.
tibbe
peekChar/peekWord8: Return Nothing at end-of-input Fixes #20.
tibbe
Add peekWord8/peekChar
solirc
Fix a bug in stringCI This is even less efficient. If there is an upper limit for the number of characters a single character can be folded to (say m), than we could probably optimize this by starting from (n `div` m) (where n is the length of the case-folded argument to stringCI).
Bryan O'Sullivan
Write a more correct stringCI implementation. This is hacky and slow :-(
Bryan O'Sullivan
Add an IsString instance.
Bryan O'Sullivan
Do not export ensure.
Michael Snoyman
Allow for partial type application
Bryan O'Sullivan
Merge
Bryan O'Sullivan
Re-add the scan parser
Bryan O'Sullivan
Add support for the text package