[Haskell-beginners] Alfred Programs in Haskell

Thomas Bach thbach at students.uni-mainz.de
Wed Mar 4 14:43:12 UTC 2015


Richard Guay <raguay at customct.com> writes:

> It's not a file permission problem because it works great when the
> file exists. But, when the file doesn't exist, it still tries to read
> the file.

Is this also the case with the version provided by Kim-Ee Yeoh?

> It acts like the file is there when it isn't. In ghci, it returns the
> true boolean when the file is there and a false when it isn't. But, in
> the program, it is always executing the readFile.

This is most unlikely a problem of ghc, i.e. I think there is some
problem in your programs logic. Can you provide further code possibly
restricting it to a minimal breaking example?

Also: have you tried running the function in question in ghci?

Regards

        Thomas.


More information about the Beginners mailing list