Idris2/tests/base/data_string_unlines001
Stepan Koltsov ce44d3b50a
Change semantics of lines and unlines function to match Haskell and other languages (#1585)
* Add trailing newline on non-empty list in unlines

There are several reasons to do that:
* a line in a text file is something which ends with newline,
  and the last line is not special
* `unlines []` should be different from `unlines [""]`
* `unlines (a ++ b) = unlines a ++ unlines b`
* Haskell does it

* Change lines function behaviour
2021-07-17 14:54:23 +01:00
..
expected Change semantics of lines and unlines function to match Haskell and other languages (#1585) 2021-07-17 14:54:23 +01:00
input Change semantics of lines and unlines function to match Haskell and other languages (#1585) 2021-07-17 14:54:23 +01:00
run Change semantics of lines and unlines function to match Haskell and other languages (#1585) 2021-07-17 14:54:23 +01:00
Unlines.idr Change semantics of lines and unlines function to match Haskell and other languages (#1585) 2021-07-17 14:54:23 +01:00