Using Cradle.

This commit is contained in:
Kazu Yamamoto
2013-03-02 16:14:55 +09:00
parent f43af4be29
commit a393f8a971
10 changed files with 62 additions and 101 deletions

View File

@@ -13,8 +13,8 @@ import System.FilePath ((</>),takeDirectory)
import Types
-- An error would be thrown
checkEnv :: Maybe FilePath -> IO Cradle
checkEnv (Just sbox) = do
findCradle :: Maybe FilePath -> IO Cradle
findCradle (Just sbox) = do
(strver, ver) <- ghcVersion
conf <- checkPackageConf sbox strver
let confOpts = ghcPackageConfOptions ver conf
@@ -33,7 +33,7 @@ checkEnv (Just sbox) = do
, cradleCabalFile = Just cfile
, cradlePackageConfOpts = Just confOpts
}
checkEnv Nothing = do
findCradle Nothing = do
(strver, ver) <- ghcVersion
wdir <- getCurrentDirectory
cfiles <- cabalDir wdir