git.iko.soy/typeable/attoparsec
on master help sign in
Return correct result from stringCI (gh-99)
commit4eafea965ee054634ec463b3f3f4485c606a2b2d authorBryan O'Sullivan <bos@serpentine.com> dateSun 5 Apr 2015, 11:19 (12 years ago) parent53b334b
1 file changed+3−1
Data/Attoparsec/ByteString/Internal.hs+3−1
Data/Attoparsec/ByteString/Internal.hs+3−1
@@ -209,7 +209,9 @@ stringSuspended f s0 s t pos more lose succ =
209209 n = B.length s'
210210 in if n >= m
211211 then if B.unsafeTake m s' == s
212− then succ' t' (pos' + Pos (B.length s0)) more' s0
212+ then let o = Pos (B.length s0)
213+ in succ' t' (pos' + o) more'
214+ (substring pos' o t')
213215 else lose' t' pos' more' [] "string"
214216 else if s' == B.unsafeTake n s
215217 then stringSuspended f s0 (B.unsafeDrop n s)