File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import Data.Maybe
99import Data.List.Extra
1010import System.FilePath
1111import Control.Concurrent.Extra
12+ import Control.Exception
1213import Control.Monad.Extra
1314import Data.Default
1415import System.Time.Extra
@@ -41,7 +42,6 @@ import GHC hiding (def)
4142import qualified GHC.Paths
4243
4344import HIE.Bios
44- import HIE.Bios.Ghc.Api (initializeFlagsWithCradle )
4545
4646-- Set the GHC libdir to the nix libdir if it's present.
4747getLibdir :: IO FilePath
@@ -130,9 +130,11 @@ showEvent lock (EventFileDiagnostics (toNormalizedFilePath -> file) diags) =
130130showEvent lock e = withLock lock $ print e
131131
132132newSession' :: Cradle -> IO HscEnvEq
133- newSession' cradle = getLibdir >>= \ libdir -> do
133+ newSession' cradle = do
134+ opts <- either throwIO return =<< getCompilerOptions " " cradle
135+ libdir <- getLibdir
134136 env <- runGhc (Just libdir) $ do
135- initializeFlagsWithCradle " " cradle
137+ _targets <- initSession opts
136138 getSession
137139 initDynLinker env
138140 newHscEnvEq env
You can’t perform that action at this time.
0 commit comments