@@ -8,8 +8,8 @@ import Control.Monad.IO.Class
8import Control.Exception
8import Control.Exception
9import Data.Text hiding (map, concat, foldl)
9import Data.Text hiding (map, concat, foldl)
10import System.FilePath.Glob
10import System.FilePath.Glob
11−import System.Directory
11+--import System.Directory
12−import System.FilePath
12+--import System.FilePath
13import Control.Monad
13import Control.Monad
15import Unsafe.Coerce
15import Unsafe.Coerce
@@ -36,11 +36,12 @@ data ScriptSessionError = ScriptSessionLoadError GhcException
36initScriptSession :: [String] -> IO (Either ScriptSessionError ScriptSession)
36initScriptSession :: [String] -> IO (Either ScriptSessionError ScriptSession)
37initScriptSession ghcPkgPaths = do
37initScriptSession ghcPkgPaths = do
38 --for the sake of convenience, for developers' builds, include the local cabal sandbox package database and the cabal new-build package database
38 --for the sake of convenience, for developers' builds, include the local cabal sandbox package database and the cabal new-build package database
39− homeDir <- getHomeDirectory
39+ --homeDir <- getHomeDirectory
40 sandboxPkgPaths <- liftM concat $ mapM glob [
40 sandboxPkgPaths <- liftM concat $ mapM glob [
41− "./dist-newstyle/packagedb/ghc-*",
42− ".cabal-sandbox/*packages.conf.d",
41+ ".cabal-sandbox/*packages.conf.d"
42+ --"./dist-newstyle/packagedb/ghc-*",
43− homeDir </> ".cabal/store/ghc-*/package.db"
44+ --homeDir </> ".cabal/store/ghc-*/package.db"
45 let excHandler exc = pure $ Left (ScriptSessionLoadError exc)
46 let excHandler exc = pure $ Left (ScriptSessionLoadError exc)
46 handleGhcException excHandler $ runGhc (Just libdir) $ do
47 handleGhcException excHandler $ runGhc (Just libdir) $ do