- handle (\exn -> case exn of
- IOException _ -> do hPutStr stderr (show exn)
- exitWith (ExitFailure 1)
- _ -> do hPutStr stderr (show (Panic (show exn)))
- exitWith (ExitFailure 1)
- ) $ do
+ handle (\exception -> do
+ case exception of
+ -- an IO exception probably isn't our fault, so don't panic
+ IOException _ -> hPutStr stderr (show exception)
+ _other -> hPutStr stderr (show (Panic (show exception)))
+ exitWith (ExitFailure 1)
+ ) $ do