Skip to content

Commit ac748c4

Browse files
committed
Use -fno-show-error-context from GHC 9.8
1 parent 7563439 commit ac748c4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ghcide/session-loader/Development/IDE/Session.hs

+9
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,9 @@ setOptions cfp (ComponentOptions theOpts compRoot _) dflags rootDir = do
12321232
Just wdir -> compRoot </> wdir
12331233
let dflags''' =
12341234
setWorkingDirectory root $
1235+
#if MIN_VERSION_ghc(9,8,0)
1236+
setNoShowErrorContext $
1237+
#endif
12351238
disableWarningsAsErrors $
12361239
-- disabled, generated directly by ghcide instead
12371240
flip gopt_unset Opt_WriteInterface $
@@ -1253,6 +1256,12 @@ setOptions cfp (ComponentOptions theOpts compRoot _) dflags rootDir = do
12531256
final_flags <- liftIO $ wrapPackageSetupException $ Compat.oldInitUnits dflags'''
12541257
return (final_flags, targets)
12551258

1259+
#if MIN_VERSION_ghc(9,8,0)
1260+
setNoShowErrorContext :: DynFlags -> DynFlags
1261+
setNoShowErrorContext df =
1262+
gopt_unset df Opt_ShowErrorContext
1263+
#endif
1264+
12561265
setIgnoreInterfacePragmas :: DynFlags -> DynFlags
12571266
setIgnoreInterfacePragmas df =
12581267
gopt_set (gopt_set df Opt_IgnoreInterfacePragmas) Opt_IgnoreOptimChanges

0 commit comments

Comments
 (0)