diff --git a/src/Internal.hs b/src/Internal.hs index 131559c..7fc3bb7 100644 --- a/src/Internal.hs +++ b/src/Internal.hs @@ -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 @@ -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