diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2018-10-12 00:41:38 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2018-10-26 04:33:07 +0200 |
commit | fbbb3590c7f6eca69a5c77a5215c29363595cd0d (patch) | |
tree | 5ba24da49a6579fdb4dd3f28459f75bf9f9931c9 /src/CabalHelper/Shared/Common.hs | |
parent | e6d50e71f0b11377c3839eee52ca08345bce7e8a (diff) |
Move 'mightExist' to Common module
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) |