Hi,
What is right way to do conditional IO?
For example, I need to write to file errors only in case they exist, otherwise my function should do nothing:
handleParseErrors errors
| (not . null) errors = writeFile "parse-errors.txt" (show errors)
| otherwise = ?
What should be an 'otherwise' case ?
Thanks!