Commits

Nicolas Pouillard committed a92e75a

Data.Text.Lazy: fix a bug in splitAt.

  • Participants
  • Parent commits 7b892e5

Comments (0)

Files changed (1)

Data/Text/Lazy.hs

   where loop _ Empty      = (empty, empty)
         loop n t | n <= 0 = (empty, t)
         loop n (Chunk t ts)
-             | n < len   = let (ts',ts'') = T.splitAt (fromIntegral n) t
+             | n < len   = let (ts',ts'') = T.splitAt n t
                            in (Chunk ts' Empty, Chunk ts'' Empty)
              | otherwise = let (ts',ts'') = loop (n - len) ts
                            in (Chunk t ts', ts'')