From 5c7bd861221330ee25c64f63f0731c566d058468 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Mon, 13 May 2013 12:57:58 +0900 Subject: [PATCH] a bug fix of missing cabal dir. --- CabalApi.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CabalApi.hs b/CabalApi.hs index dfdd4a9..3cc9d1a 100644 --- a/CabalApi.hs +++ b/CabalApi.hs @@ -42,11 +42,11 @@ cookInfo :: [String] -> Cradle -> GenericPackageDescription -> BuildInfo -> ([GHCOption],[IncludeDir],[Package]) cookInfo ghcOptions cradle cabal binfo = (gopts,idirs,depPkgs) where - owdir = cradleCurrentDir cradle + wdir = cradleCurrentDir cradle Just cdir = cradleCabalDir cradle Just cfile = cradleCabalFile cradle gopts = getGHCOptions ghcOptions binfo - idirs = includeDirectories cdir owdir $ cabalAllSourceDirs cabal + idirs = includeDirectories cdir wdir $ cabalAllSourceDirs cabal depPkgs = removeMe cfile $ cabalAllDependPackages cabal removeMe :: FilePath -> [String] -> [String] @@ -119,8 +119,8 @@ fromPackageDescription f1 f2 f3 f4 pd = lib ++ exe ++ tests ++ bench ---------------------------------------------------------------- includeDirectories :: String -> String -> [FilePath] -> [String] -includeDirectories cdir owdir [] = uniqueAndSort [cdir,owdir] -includeDirectories cdir owdir dirs = uniqueAndSort (map (cdir ) dirs ++ [owdir]) +includeDirectories cdir wdir [] = uniqueAndSort [cdir,wdir] +includeDirectories cdir wdir dirs = uniqueAndSort (map (cdir ) dirs ++ [cdir,wdir]) ----------------------------------------------------------------