[project @ 2003-04-15 10:41:14 by simonmar]
authorsimonmar <unknown>
Tue, 15 Apr 2003 10:41:14 +0000 (10:41 +0000)
committersimonmar <unknown>
Tue, 15 Apr 2003 10:41:14 +0000 (10:41 +0000)
commit4069565b51edf783681e29b2c20592d96f38d6d9
treed2dcd2054afd453fce103818f8ab40f3ba771974
parent464a57b179b52928cb31c34f101910d33dc22eb0
[project @ 2003-04-15 10:41:14 by simonmar]
Re-instate joinPS which appears to have been accidentally left out of
this revised version of PackedString, and add unlinesPS and unwordsPS
which are the analogs of Data.List.unlines and Data.List.unwords
respectively.

Fix bug: linesPS doesn't work the same way as Data.List.lines, because
it strips out empty lines, and it therefore isn't the inverse of
unlinesPS.  This is because linesPS is defined in terms of splitPS,
which omits empty substrings.  However, the comments next to
splitPS/splitWithPS state that the following should hold:

  joinPS (packString [x]) (splitPS x ls) = ls

which implies that splitPS should *not* omit empty substrings.  So the
definition of splitPS is inconsistent.  I therefore opted to fix
splitPS to make the above property hold, and modify wordsPS to work
with the new definition (it previously relied on the old behaviour).
Data/PackedString.hs