Open Profpatsch opened 9 years ago
I'll probably go with (A). Can you give me the exact exception so that I can document it?
Also, you can in theory do a limited form of (C) where you can verify the existence of the folder once and then encode the existence in the types. Then you can guarantee that any downstream operation that depends on the folder existing will succeed (barring removal by some other method).
service-checker.hs: out/scripts/information: openFile: does not exist (No such file or directory)
Going with a) I think it should be sufficient to link to the System.IO function it calls.
When I try to write to a file where the directory doesn’t exist it crashes at runtime.
It would be nice if a) either the possible IOExceptions are documented or b) it returned a
Maybe
orEither
or even c) it can be type-checked whether the system knows if this folder can exist (which probably is a silly idea)