readFile needs a newline

This isn't strictly right yet (there should be no newline on the last
lie if there was no newline in the input file) but it puts the behaviour
back to what it was before fGetLine was changed to discard it.

This needs revisiting...
This commit is contained in:
Edwin Brady 2020-05-04 21:05:51 +01:00
parent 45d02a11b7
commit 30b609d55f

View File

@ -147,7 +147,7 @@ readFile file
else
do Right str <- fGetLine h
| Left err => pure (Left err)
read (str :: acc) h
read ((str ++ "\n") :: acc) h
||| Write a string to a file
export