Simplify the wrapIO function
authorIustin Pop <iustin@google.com>
Wed, 26 Aug 2009 07:45:41 +0000 (09:45 +0200)
committerIustin Pop <iustin@google.com>
Wed, 26 Aug 2009 07:45:41 +0000 (09:45 +0200)
This fixes one warning from hlint.

Ganeti/HTools/CLI.hs

index 5bd47ad..0309687 100644 (file)
@@ -326,9 +326,7 @@ shTemplate =
 
 -- | Error beautifier
 wrapIO :: IO (Result a) -> IO (Result a)
-wrapIO act =
-    handle (\e -> return $ Bad $ show e)
-    act
+wrapIO = handle (return . Bad . show)
 
 -- | External tool data loader from a variety of sources.
 loadExternalData :: Options