git.iko.soy/typeable/attoparsec
on master help sign in
Move a definition
commitf486be30462051b5ad410e9b131405a4870e8e3b authorBryan O'Sullivan <bos@serpentine.com> dateFri 27 Mar 2015, 15:00 (12 years ago) parent14ea384
1 file changed+1−1
Data/Attoparsec/ByteString/Internal.hs+1−1
Data/Attoparsec/ByteString/Internal.hs+1−1
@@ -183,6 +183,7 @@ string_ :: (forall r. ByteString -> ByteString -> Buffer -> Pos -> More
183183 -> ByteString -> Parser ByteString
184184string_ suspended f s0 = T.Parser $ \t pos more lose succ ->
185185 let n = B.length s
186+ s = f s0
186187 in if lengthAtLeast pos n t
187188 then if s == substring pos (Pos n) t
188189 then succ t (pos + Pos n) more s
@@ -191,7 +192,6 @@ string_ suspended f s0 = T.Parser $ \t pos more lose succ ->
191192 in if t' `B.isPrefixOf` s
192193 then suspended s (B.drop (B.length t') s) t pos more lose succ
193194 else lose t pos more [] "string"
194− where s = f s0
195195{-# INLINE string_ #-}
196196
197197stringSuspended :: (ByteString -> ByteString)