diff --git a/Cabal/Distribution/Simple/Glob.hs b/Cabal/Distribution/Simple/Glob.hs index c033c3198e6..629f45cf60a 100644 --- a/Cabal/Distribution/Simple/Glob.hs +++ b/Cabal/Distribution/Simple/Glob.hs @@ -18,7 +18,6 @@ module Distribution.Simple.Glob ( GlobSyntaxError(..), GlobResult(..), globMatches, - matchFileGlob, matchDirFileGlob, matchDirFileGlob', fileGlobMatches, @@ -193,9 +192,6 @@ parseFileGlob version filepath = case reverse (splitDirectories filepath) of | version >= mkVersion [2,4] = MultiDotEnabled | otherwise = MultiDotDisabled -matchFileGlob :: Verbosity -> Version -> FilePath -> IO [GlobResult FilePath] -matchFileGlob verbosity version = matchDirFileGlob verbosity version "." - -- | Like 'matchDirFileGlob'', but will 'die'' when the glob matches -- no files. matchDirFileGlob :: Verbosity -> Version -> FilePath -> FilePath -> IO [GlobResult FilePath] diff --git a/Cabal/Distribution/Simple/Haddock.hs b/Cabal/Distribution/Simple/Haddock.hs index 656bffe4e5c..7f2495ecf16 100644 --- a/Cabal/Distribution/Simple/Haddock.hs +++ b/Cabal/Distribution/Simple/Haddock.hs @@ -306,7 +306,7 @@ haddock pkg_descr lbi suffixes flags' = do CBench _ -> (when (flag haddockBenchmarks) $ smsg >> doExe component) >> return index for_ (extraDocFiles pkg_descr) $ \ fpath -> do - files <- fmap globMatches $ matchFileGlob verbosity (specVersion pkg_descr) fpath + files <- fmap globMatches $ matchDirFileGlob verbosity (specVersion pkg_descr) "." fpath for_ files $ copyFileTo verbosity (unDir $ argOutputDir commonArgs) -- ------------------------------------------------------------------------------ diff --git a/Cabal/Distribution/Simple/SrcDist.hs b/Cabal/Distribution/Simple/SrcDist.hs index e14db820c4a..06560164b75 100644 --- a/Cabal/Distribution/Simple/SrcDist.hs +++ b/Cabal/Distribution/Simple/SrcDist.hs @@ -149,7 +149,7 @@ listPackageSourcesMaybeExecutable verbosity pkg_descr = -- Extra source files. fmap concat . for (extraSrcFiles pkg_descr) $ \fpath -> fmap globMatches $ - matchFileGlob verbosity (specVersion pkg_descr) fpath + matchDirFileGlob verbosity (specVersion pkg_descr) "." fpath -- | List those source files that should be copied with ordinary permissions. listPackageSourcesOrdinary :: Verbosity @@ -223,7 +223,7 @@ listPackageSourcesOrdinary verbosity pkg_descr pps = , fmap concat . for (extraDocFiles pkg_descr) $ \ filename -> fmap globMatches $ - matchFileGlob verbosity (specVersion pkg_descr) filename + matchDirFileGlob verbosity (specVersion pkg_descr) "." filename -- License file(s). , return (licenseFiles pkg_descr)