diff options
Diffstat (limited to 'Utility.hs')
-rw-r--r-- | Utility.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Utility.hs b/Utility.hs index 1c6b4d21e..5639a8799 100644 --- a/Utility.hs +++ b/Utility.hs @@ -24,6 +24,7 @@ module Utility ( dirContains, dirContents, myHomeDir, + catchBool, prop_idempotent_shellEscape, prop_idempotent_shellEscape_multiword, @@ -256,3 +257,7 @@ myHomeDir = do uid <- getEffectiveUserID u <- getUserEntryForID uid return $ homeDirectory u + +{- Catches IO errors and returns a Bool -} +catchBool :: IO Bool -> IO Bool +catchBool = flip catch (const $ return False) |