Skip to content

Commit

Permalink
Cleanup directory compat
Browse files Browse the repository at this point in the history
  • Loading branch information
angerman committed Feb 10, 2018
1 parent 3a9830b commit 767efff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cabal/Distribution/Simple/Configure.hs
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ import Distribution.Compat.Exception ( catchExit, catchIO )


#if !MIN_VERSION_directory(1,2,5)
import System.Directory (getDirectoryContents)
import qualified System.Directory as Dir (getDirectoryContents)
listDirectory :: FilePath -> IO [FilePath]
listDirectory path =
(filter f) <$> (getDirectoryContents path)
filter f <$> Dir.getDirectoryContents path
where f filename = filename /= "." && filename /= ".."
#else
import System.Directory (listDirectory)
Expand Down

0 comments on commit 767efff

Please sign in to comment.