aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Shared/Common.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/CabalHelper/Shared/Common.hs')
-rw-r--r--src/CabalHelper/Shared/Common.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/CabalHelper/Shared/Common.hs b/src/CabalHelper/Shared/Common.hs
index 8e8418b..d60e745 100644
--- a/src/CabalHelper/Shared/Common.hs
+++ b/src/CabalHelper/Shared/Common.hs
@@ -162,3 +162,8 @@ readPackageDescription = P.readGenericPackageDescription
#else
readPackageDescription = P.readPackageDescription
#endif
+
+mightExist :: FilePath -> IO (Maybe FilePath)
+mightExist f = do
+ exists <- doesFileExist f
+ return $ if exists then (Just f) else (Nothing)