[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).