documentation bug in base

Ben Franksen ben.franksen at online.de
Sun Oct 15 19:10:20 UTC 2017


Data.List claims:

  unlines is an inverse operation to lines.

which I understand to mean

  prop> unlines (lines s) = s

which is false in general. It should say

  prop> unlines (lines s) = if last s == '\n' then s else s ++ "\n"

Cheers
Ben



More information about the Libraries mailing list