elm-console
elm-console copied to clipboard
Add readFile
It would be nice to read from a file. readFile : String -> IO String
. An invalid path would be the same as pure ""
; alternatively it may return an IO (Maybe String)
or similarly with a Result
.
If you like the idea but don't have time to implement it, I could sent a PR sometime next week.
Actually I don't think it belongs in this library. Since I forked maxsnew/IO, I wanted to focus on using the console, specifically to support things like elm-test. writeFile
only exists for historical reasons, and probably should be removed.
There are many complications with file reading & writing file (handling errors, joining paths, character encoding) which I think should exist in a separate library.