Re: [GHC] #1375: ByteString’s “lines” eats empty lines
GHC
trac at galois.com
Sun May 27 13:09:48 EDT 2007
#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: => dons at cse.unsw.edu.au
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
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list