Filtering problematic packages.
This commit is contained in:
parent
024b6b3200
commit
5750673e0e
@ -51,13 +51,21 @@ cookInfo ghcOptions cradle cabal = (gopts,idirs,depPkgs)
|
||||
buildInfos = cabalAllBuildInfo cabal
|
||||
gopts = getGHCOptions ghcOptions $ head buildInfos
|
||||
idirs = includeDirectories cdir wdir $ cabalAllSourceDirs buildInfos
|
||||
depPkgs = removeMe cfile $ cabalAllDependPackages buildInfos
|
||||
depPkgs = removeThem problematicPackages $ removeMe cfile $ cabalAllDependPackages buildInfos
|
||||
|
||||
removeMe :: FilePath -> [String] -> [String]
|
||||
removeMe cabalfile = filter (/= me)
|
||||
where
|
||||
me = dropExtension $ takeFileName cabalfile
|
||||
|
||||
removeThem :: [String] -> [String] -> [String]
|
||||
removeThem badpkgs = filter (`notElem` badpkgs)
|
||||
|
||||
problematicPackages :: [String]
|
||||
problematicPackages = [
|
||||
"base-compat" -- providing "Prelude"
|
||||
]
|
||||
|
||||
includeDirectories :: String -> String -> [FilePath] -> [String]
|
||||
includeDirectories cdir wdir [] = uniqueAndSort [cdir,wdir]
|
||||
includeDirectories cdir wdir dirs = uniqueAndSort (map (cdir </>) dirs ++ [cdir,wdir])
|
||||
|
Loading…
Reference in New Issue
Block a user