Data.Text: fix a bug in drop.
--HG--
extra : convert_revision : 8fee95682fcfc7334ea3cdc67b3e6f32d29cffc3
commit1cbdee0ea4866894148793ca0adeaa3476ed801c
authorNicolas Pouillard <nicolas.pouillard@gmail.com>
dateThu 5 Mar 2009, 15:04 (18 years ago)
parent701d179
Data/Text.hs+1−1
@@ -598,7 +598,7 @@ drop n t@(Text arr off len)
598598 | otherwise = loop 0 0
599599 where end = off + len
600600 loop !i !cnt
601− | i >= end || cnt >= n = Text arr (off+i) (len-i)
601+ | i >= len || cnt >= n = Text arr (off+i) (len-i)
602602 | otherwise = loop (i+d) (cnt+1)
603603 where d = iter_ t i
604604{-# INLINE [1] drop #-}