Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add readFile #11

Open
mgold opened this issue Apr 1, 2016 · 1 comment
Open

Add readFile #11

mgold opened this issue Apr 1, 2016 · 1 comment

Comments

@mgold
Copy link

mgold commented Apr 1, 2016

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.

@laszlopandy
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants