I do not get such an error with putStrLn - this is good in the code that you posted (the difference between the messages may be different, SO does not play tabs and instead only displays indents through spaces, which matters for Haskell).
However, you have existFailure , which I think is really cool, but you probably mean using the exitFailure function. Note the difference between exist and exit .
source share