solirc  committed c279a93

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).

  • Participants
  • Parent commits 585c145
  • Branches default

Comments (0)

Files changed (1)

File Data/Attoparsec/Text/Internal.hs

 -- "ss"), which makes a simple, efficient implementation tricky.  We
 -- have (for now) chosen simplicity over efficiency.
 stringCI :: Text -> Parser Text
-stringCI s = go (T.length s)
+stringCI s = go 0
     go !n
       | n > T.length fs = fail "stringCI"