attoparsec
attoparsec copied to clipboard
notInClass seems to handle UTF-8 needlessly
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.
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.