Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notInClass seems to handle UTF-8 needlessly #152

Open
flip111 opened this issue Mar 2, 2019 · 1 comment
Open

notInClass seems to handle UTF-8 needlessly #152

flip111 opened this issue Mar 2, 2019 · 1 comment

Comments

@flip111
Copy link

flip111 commented Mar 2, 2019

https://hackage.haskell.org/package/attoparsec-0.13.2.2/docs/Data-Attoparsec-ByteString.html#v:notInClass

When looking at core i saw the following:

        (notInClass
           (ghc-prim-0.5.3:GHC.CString.unpackCStringUtf8#
              "some string here"#)
           w_a3cX)

The unpackCStringUtf8 is not in notInClass itself, but seems to be the result from notInClass using String as input. Also i doubt whether a list type like String is the best choice here.

@bgamari
Copy link
Collaborator

bgamari commented Apr 2, 2019

Indeed, this sounds like some nice low-hanging fruit. It would be good to introduce a RULE to rewrite notInClass (unpackCStringUtf8# "..."#) into something a bit more sensible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants