Skip to content
Open
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
10 changes: 9 additions & 1 deletion src/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
module Internal where

import Distribution.Simple
#if MIN_VERSION_Cabal(3,14,0)
import Distribution.Utils.Path (getSymbolicPath, makeSymbolicPath)
#endif
#if MIN_VERSION_Cabal(2,4,0)
import Distribution.Simple.Glob (matchDirFileGlob)
import Distribution.Types.PackageDescription
Expand All @@ -20,7 +23,12 @@ fromPackageName (PackageName s) = s
#endif

matchFileGlob :: Verbosity -> PackageDescription -> FilePath -> IO [FilePath]
#if MIN_VERSION_Cabal(2,4,0)
#if MIN_VERSION_Cabal(3,14,0)
-- | Modified to conform to newest cabal signature
matchFileGlob verb descr = toFilePath . matchDirFileGlob verb (specVersion descr) (Just (makeSymbolicPath ".")) . makeSymbolicPath
where
toFilePath = fmap . fmap $ getSymbolicPath
#elif MIN_VERSION_Cabal(2,4,0)
-- | Newer versions of Cabal have removed this function in favour of more configurable implementation
matchFileGlob verb descr = matchDirFileGlob verb (specVersion descr) "."
#else
Expand Down
Loading