Haskell way to do error checking of multiple items with abort
问题 What is a good way for a Haskell function to check a number of different conditions and return an error message on a failure? In Python or similar language, it would be straightforward: if failure_1: return "test1 failed" if failure_2: return "test2 failed" ... if failure_n: return "testn failed" do_computation How do you do this without arbitrarily nested case/if statements in Haskell? Edit: some of the test conditions may require IO which puts any test results in the IO monad. I believe