Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Cabal/Distribution/Simple/Glob.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module Distribution.Simple.Glob (
GlobSyntaxError(..),
GlobResult(..),
globMatches,
matchFileGlob,
matchDirFileGlob,
matchDirFileGlob',
fileGlobMatches,
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion Cabal/Distribution/Simple/Haddock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

-- ------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions Cabal/Distribution/Simple/SrcDist.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down