Skip to content

Commit

Permalink
9.8.1 support
Browse files Browse the repository at this point in the history
  • Loading branch information
wz1000 committed Nov 13, 2023
1 parent c547368 commit 6c1ce24
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/HIE/Bios/Ghc/Gap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ import qualified HscMain as G
import qualified GhcMake as G
#endif

#if __GLASGOW_HASKELL__ >= 907
import GHC.Types.Error (mkUnknownDiagnostic, Messages)
import GHC.Driver.Errors.Types (DriverMessage)
#endif

ghcVersion :: String
ghcVersion = VERSION_ghc

Expand All @@ -149,7 +154,10 @@ homeUnitId_ :: DynFlags -> UnitId
homeUnitId_ = homeUnitId
#endif

#if __GLASGOW_HASKELL__ >= 904
#if __GLASGOW_HASKELL__ >= 907
load' :: GhcMonad m => Maybe G.ModIfaceCache -> LoadHowMuch -> Maybe Messager -> ModuleGraph -> m SuccessFlag
load' mhmi_cache how_much = G.load' mhmi_cache how_much mkUnknownDiagnostic
#elif __GLASGOW_HASKELL__ >= 904
load' :: GhcMonad m => Maybe G.ModIfaceCache -> LoadHowMuch -> Maybe Messager -> ModuleGraph -> m SuccessFlag
load' = G.load'
#else
Expand Down Expand Up @@ -410,7 +418,12 @@ parseDynamicFlags :: MonadIO m
=> Logger
-> DynFlags
-> [G.Located String]
-> m (DynFlags, [G.Located String], [CmdLine.Warn])
-> m (DynFlags, [G.Located String]
#if __GLASGOW_HASKELL__ >= 907
, Messages DriverMessage)
#else
, [CmdLine.Warn])
#endif
#if __GLASGOW_HASKELL__ >= 902
parseDynamicFlags = G.parseDynamicFlags
#else
Expand Down

0 comments on commit 6c1ce24

Please sign in to comment.