Inconsistent line and word behavior
lines is an actual bijection: you can use it to split any line into '\n' characters, and then fully assemble them using unlines . (Well, almost: let the trailing newlines and the end of the Windows line be ignored.)
If words had the same behavior with only ' ' instead of '\n' as the delimiter character, this would not work exactly the way we want it: for example, a string
"I will not buy this record\nit is scratched" will be divided into
["I","will","not","buy","this","record\nit","is","scratched"] which words escapes by breaking in any space.
Prelude> words "I will not buy this record\nit is scratched" ["I","will","not","buy","this","record","it","is","scratched"] This means that a) this is not a bijection, since the smell of a space is lost, and b) you will get many โempty wordsโ when there are two adjacent adjacent characters.
Therefore, the reasonable behavior for words is to simply condense such spaces in one space.