What about ErrorT monad transformer? Well, if it's not what you really
want, you can define your own one without ugly Error class, so it'd
be something like
execute :: FilePath - [String] - MyCoolErrorT ExecuteError IO ExitCode
On 14 Apr 2009, at 23:29, br...@lorf.org wrote:
I'm finding it
On Tuesday, 14.04.09 at 23:36, Miguel Mitrofanov wrote:
What about ErrorT monad transformer?
I don't see how it helps in my situation. ErrorT doesn't catch
exceptions, for example. Suppose I did make something like ErrorT that
catches exceptions and turn them into Lefts. Where would (=) get my
There's no way to make all your tests atomically, e.g, between the
test that p exists and executing p, some other process could removce
p.
So the right way to do this (like opening a file), is to try executing
it and let the OS tell you if it failed.
On Tue, Apr 14, 2009 at 9:29 PM,
On Tue, 14 Apr 2009, Miguel Mitrofanov wrote:
What about ErrorT monad transformer? Well, if it's not what you really want,
you can define your own one without ugly Error class, so it'd be something
like
execute :: FilePath - [String] - MyCoolErrorT ExecuteError IO ExitCode
My MyCoolErrorT
On Tue, 14 Apr 2009, br...@lorf.org wrote:
On Tuesday, 14.04.09 at 23:36, Miguel Mitrofanov wrote:
What about ErrorT monad transformer?
I don't see how it helps in my situation. ErrorT doesn't catch
exceptions, for example. Suppose I did make something like ErrorT that
catches exceptions
On Tuesday, 14.04.09 at 22:13, Lennart Augustsson wrote:
So the right way to do this (like opening a file), is to try executing
it and let the OS tell you if it failed.
I know, but the various functions that create processes don't help me
know whether the program actually ran or not. For
Quoth br...@lorf.org,
On Tuesday, 14.04.09 at 22:13, Lennart Augustsson wrote:
So the right way to do this (like opening a file), is to try executing
it and let the OS tell you if it failed.
I know, but the various functions that create processes don't help me
know whether the program
Quoth br...@lorf.org,
execute :: FilePath - [String] - IO (Either ExecuteError ExitCode)
where 'ExecuteError' is a data type representing all the ways 'execute'
could fail and that 'execute p args' is supposed to
* ensure p exists
* get p's permissions
* ensure p is readable
* ensure p