@@ -244,10 +244,6 @@ import Data.List (foldl')
244
244
import qualified Data.Map as Map
245
245
import qualified Data.Set as S
246
246
247
- #if !MIN_VERSION_ghc(8,10,0)
248
- import Bag (unitBag )
249
- #endif
250
-
251
247
#if MIN_VERSION_ghc(9,2,0)
252
248
import GHC.Builtin.Uniques
253
249
import GHC.ByteCode.Types
@@ -404,17 +400,10 @@ pattern PFailedWithErrorMessages msgs
404
400
#else
405
401
<- PFailed (const . fmap pprError . getErrorMessages -> msgs)
406
402
#endif
407
- #elif MIN_VERSION_ghc(8,10,0)
408
- pattern PFailedWithErrorMessages :: (DynFlags -> ErrorMessages ) -> ParseResult a
409
- pattern PFailedWithErrorMessages msgs
410
- <- PFailed (getErrorMessages -> msgs)
411
403
#else
412
404
pattern PFailedWithErrorMessages :: (DynFlags -> ErrorMessages ) -> ParseResult a
413
405
pattern PFailedWithErrorMessages msgs
414
- <- ((fmap . fmap ) unitBag . mkPlainErrMsgIfPFailed -> Just msgs)
415
-
416
- mkPlainErrMsgIfPFailed (PFailed _ pst err) = Just (\ dflags -> mkPlainErrMsg dflags pst err)
417
- mkPlainErrMsgIfPFailed _ = Nothing
406
+ <- PFailed (getErrorMessages -> msgs)
418
407
#endif
419
408
{-# COMPLETE POk, PFailedWithErrorMessages #-}
420
409
@@ -488,24 +477,16 @@ nameListFromAvails as =
488
477
489
478
490
479
getModuleHash :: ModIface -> Fingerprint
491
- #if MIN_VERSION_ghc(8,10,0)
492
480
getModuleHash = mi_mod_hash . mi_final_exts
493
- #else
494
- getModuleHash = mi_mod_hash
495
- #endif
496
481
497
482
498
483
disableWarningsAsErrors :: DynFlags -> DynFlags
499
484
disableWarningsAsErrors df =
500
485
flip gopt_unset Opt_WarnIsError $ foldl' wopt_unset_fatal df [toEnum 0 .. ]
501
486
502
487
isQualifiedImport :: ImportDecl a -> Bool
503
- #if MIN_VERSION_ghc(8,10,0)
504
488
isQualifiedImport ImportDecl {ideclQualified = NotQualified } = False
505
489
isQualifiedImport ImportDecl {} = True
506
- #else
507
- isQualifiedImport ImportDecl {ideclQualified} = ideclQualified
508
- #endif
509
490
isQualifiedImport _ = False
510
491
511
492
@@ -566,8 +547,7 @@ generatedNodeInfo = sourceNodeInfo -- before ghc 9.0, we don't distinguish the s
566
547
#endif
567
548
568
549
data GhcVersion
569
- = GHC88
570
- | GHC810
550
+ = GHC810
571
551
| GHC90
572
552
| GHC92
573
553
| GHC94
@@ -585,8 +565,6 @@ ghcVersion = GHC92
585
565
ghcVersion = GHC90
586
566
#elif MIN_VERSION_GLASGOW_HASKELL(8,10,0,0)
587
567
ghcVersion = GHC810
588
- #elif MIN_VERSION_GLASGOW_HASKELL(8,8,0,0)
589
- ghcVersion = GHC88
590
568
#endif
591
569
592
570
runUnlit :: Logger -> DynFlags -> [Option ] -> IO ()
0 commit comments