@@ -741,11 +741,10 @@ split c = splitWith (==c)
741741-- > splitWith (=='a') "aabbaca" == ["","","bb","c",""]
742742-- > splitWith (=='a') [] == []
743743splitWith :: (Char -> Bool) -> Text -> [Text]
744−splitWith p = loop
745− where loop s | null s = []
746− | otherwise = if null s'
747− then [s]
748− else l : loop (unsafeTail s')
744+splitWith _ (Text _off _arr 0) = []
745+splitWith p t = loop t
746+ where loop s | null s' = [l]
747+ | otherwise = l : loop (unsafeTail s')
749748 where (l, s') = break p s
750749{-# INLINE splitWith #-}
751750