supporting sandbox only (without cabal) to fix #164.

This commit is contained in:
Kazu Yamamoto
2014-03-30 17:28:57 +09:00
parent 5e01a45218
commit 3bfbbb8b5c
6 changed files with 69 additions and 41 deletions

View File

@@ -44,8 +44,7 @@ debug opt cradle fileName = do
where
currentDir = cradleCurrentDir cradle
mCabalFile = cradleCabalFile cradle
mCabalDir = cradleCabalDir cradle
rootDir = fromMaybe currentDir mCabalDir
rootDir = cradleRootDir cradle
cabal = isJust mCabalFile
cabalFile = fromMaybe "" mCabalFile
origGopts = ghcOpts opt
@@ -68,8 +67,4 @@ root :: Options
-> Cradle
-> FilePath -- ^ A target file.
-> Ghc String
root _ cradle _ = return $ rootDir ++ "\n"
where
currentDir = cradleCurrentDir cradle
mCabalDir = cradleCabalDir cradle
rootDir = fromMaybe currentDir mCabalDir
root _ cradle _ = return $ cradleRootDir cradle ++ "\n"