Skip to content

Commit

Permalink
Display output from initialising cradle in debug mode (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpickering authored Feb 10, 2020
1 parent ad43ad9 commit 76221fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import GHC hiding (def)
import qualified GHC.Paths

import HIE.Bios
import HIE.Bios.Types

-- Set the GHC libdir to the nix libdir if it's present.
getLibdir :: IO FilePath
Expand Down Expand Up @@ -181,7 +182,8 @@ showEvent lock e = withLock lock $ print e

cradleToSession :: Cradle a -> IO HscEnvEq
cradleToSession cradle = do
cradleRes <- getCompilerOptions "" cradle
let showLine s = putStrLn ("> " ++ s)
cradleRes <- runCradle (cradleOptsProg cradle) showLine ""
opts <- case cradleRes of
CradleSuccess r -> pure r
CradleFail err -> throwIO err
Expand Down

0 comments on commit 76221fb

Please sign in to comment.