@@ -325,7 +325,7 @@ generateObjectCode session summary guts = do
325
325
withWarnings " object" $ \ tweak -> do
326
326
let env' = tweak (hscSetFlags (ms_hspp_opts summary) session)
327
327
target = platformDefaultBackend (hsc_dflags env')
328
- newFlags = setBackend target $ updOptLevel 0 $ (hsc_dflags env') { outputFile = Just dot_o }
328
+ newFlags = setBackend target $ updOptLevel 0 $ setOutputFile dot_o $ hsc_dflags env'
329
329
session' = hscSetFlags newFlags session
330
330
#if MIN_VERSION_ghc(9,0,1)
331
331
(outputFilename, _mStub, _foreign_files, _cinfos) <- hscGenHardCode session' guts
@@ -454,7 +454,7 @@ atomicFileWrite targetPath write = do
454
454
455
455
generateHieAsts :: HscEnv -> TcModuleResult -> IO ([FileDiagnostic ], Maybe (HieASTs Type ))
456
456
generateHieAsts hscEnv tcm =
457
- handleGenerationErrors' dflags " extended interface generation" $ runHsc hscEnv $ do
457
+ handleGenerationErrors' dflags " extended interface generation" $ runHsc hscEnv $
458
458
-- These varBinds use unitDataConId but it could be anything as the id name is not used
459
459
-- during the hie file generation process. It's a workaround for the fact that the hie modules
460
460
-- don't export an interface which allows for additional information to be added to hie files.
@@ -465,9 +465,13 @@ generateHieAsts hscEnv tcm =
465
465
top_ev_binds = tcg_ev_binds ts :: Util. Bag EvBind
466
466
insts = tcg_insts ts :: [ClsInst ]
467
467
tcs = tcg_tcs ts :: [TyCon ]
468
- Just <$> GHC. enrichHie (fake_splice_binds `Util.unionBags` real_binds) (tmrRenamed tcm) top_ev_binds insts tcs
468
+ in
469
+ #if MIN_VERSION_ghc(9,2,0)
470
+ fmap (join . snd ) $ liftIO $ initDs hscEnv ts $
471
+ #endif
472
+ Just <$> GHC. enrichHie (fake_splice_binds `Util.unionBags` real_binds) (tmrRenamed tcm) top_ev_binds insts tcs
469
473
#else
470
- Just <$> GHC. enrichHie (fake_splice_binds `Util.unionBags` real_binds) (tmrRenamed tcm)
474
+ in Just <$> GHC. enrichHie (fake_splice_binds `Util.unionBags` real_binds) (tmrRenamed tcm)
471
475
#endif
472
476
where
473
477
dflags = hsc_dflags hscEnv
0 commit comments