#1375: ByteString’s “lines” eats empty lines
-------------------------------+--------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: high | Milestone: 6.8
Component: libraries/base | Version: 6.6.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Unknown | Testcase:
Architecture: Unknown |
-------------------------------+--------------------------------------------
Changes (by igloo):
* milestone: => 6.8
* priority: normal => high
* cc: => [EMAIL PROTECTED]
Comment:
In particular, it's Lazy.Char8 that has the problem. Here's the
(libraries/base) HEAD:
{{{
Prelude> lines "a\n\nb\n\nc"
["a","","b","","c"]
Prelude> :m - Prelude
> :m + Data.ByteString.Char8
Data.ByteString.Char8> Prelude.map unpack (lines (pack "a\n\nb\n\nc"))
["a","","b","","c"]
Data.ByteString.Char8> :m - Data.ByteString.Char8
> :m + Data.ByteString.Lazy.Char8
Data.ByteString.Lazy.Char8> Prelude.map unpack (lines (pack
"a\n\nb\n\nc"))
["a","b","c"]
}}}
I haven't looked at the development branch of fps/bytestring.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1375>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs