diff options
Diffstat (limited to 'src/CabalHelper/Shared/Common.hs')
-rw-r--r-- | src/CabalHelper/Shared/Common.hs | 5 |
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) |