serokell / universum

:milky_way: Prelude written in @Serokell
MIT License
176 stars 26 forks source link

[#186] Implemented hClose and withFile #200

Closed JustusAdam closed 5 years ago

JustusAdam commented 5 years ago

So I read the heading of #186 and thought "hey, they should have withFile". Only after I started to implement it did I realize that discussion was already happening.

So I sort of accidentally already did the implementation.

This version currently exports withFile and openFile and hClose. And simply advises against using openFile and hClose in the documentation. Once we've settled the discussion of what should be exported this can be adjusted as needed.

gromakovsky commented 5 years ago

Also, this is a slightly breaking change, because more general version of withFile can break type inference, but I think that's very unlikely, so I'd treat it as a "feature" instead :)

JustusAdam commented 5 years ago

One, kind of general, question I have is, should I reword the commits? I only just read that, if there's an issue you prefer to prefix commits with issue numbers. If you like, I can reword the commit messages to follow this policy.

DanielRrr commented 5 years ago

Looks nice