@@ -156,7 +156,13 @@ showEvent lock e = withLock lock $ print e
156156
157157cradleToSession :: Cradle -> IO HscEnvEq
158158cradleToSession cradle = do
159− opts <- either throwIO return =<< getCompilerOptions "" cradle
159+ cradleRes <- getCompilerOptions "" cradle
160+ opts <- case cradleRes of
161+ CradleSuccess r -> pure r
162+ CradleFail err -> throwIO err
163+ -- TODO Rather than failing here, we should ignore any files that use this cradle.
164+ -- That will require some more changes.
165+ CradleNone -> fail "'none' cradle is not yet supported"
160166 libdir <- getLibdir
161167 env <- runGhc (Just libdir) $ do
162168 _targets <- initSession opts