packages feed

pinned-warnings-0.1.0.2: src/GhcFacade.hs

{-# LANGUAGE CPP #-}
{-# LANGUAGE PatternSynonyms #-}
module GhcFacade
  ( module X
  , pattern RealSrcLoc'
  , log_action'
  ) where

#if MIN_VERSION_ghc(9,0,0)
import GHC as X
import GHC.Core.Class as X
import GHC.Core.Make as X
import GHC.Data.Bag as X
import GHC.Data.FastString as X
import GHC.Data.IOEnv as X
import GHC.Driver.Plugins as X hiding (TcPlugin)
import GHC.Driver.Session
import GHC.Driver.Types as X
import GHC.Tc.Plugin as X
import GHC.Tc.Types as X
import GHC.Tc.Types.Constraint as X
import GHC.Tc.Types.Evidence as X
import GHC.Types.Name.Occurrence as X
import GHC.Types.SrcLoc as X
import GHC.Utils.Error as X

#elif MIN_VERSION_ghc(8,10,0)
import Bag as X
import Class as X
import Constraint as X
import DynFlags as X
import ErrUtils as X
import FastString as X
import GHC as X
import HscMain as X
import HscTypes as X
import IOEnv as X
import MkCore as X
import OccName as X
import Outputable as X
import Plugins as X hiding (TcPlugin)
import SrcLoc as X
import TcEvidence as X
import TcPluginM as X
import TcRnTypes as X
#endif

pattern RealSrcLoc' :: RealSrcLoc -> SrcLoc
pattern RealSrcLoc' s <-
#if MIN_VERSION_ghc(9,0,1)
    RealSrcLoc s _
#elif MIN_VERSION_ghc(8,10,0)
    RealSrcLoc s
#endif

log_action' :: LogAction -> (DynFlags -> Severity -> SrcSpan -> MsgDoc -> IO ()) -> LogAction
#if MIN_VERSION_ghc(9,0,1)
log_action' action withStuff dflags warnReason severity srcSpan msgDoc = do
  withStuff dflags severity srcSpan msgDoc
  action dflags warnReason severity srcSpan msgDoc
#elif MIN_VERSION_ghc(8,10,0)
log_action' action withStuff dflags warnReason severity srcSpan pprStyle msgDoc = do
  withStuff dflags severity srcSpan msgDoc
  action dflags warnReason severity srcSpan pprStyle msgDoc
#endif