GHC.Unit.Module.Warnings

ghc-9.2.0.20210422: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Unit.Module.Warnings

Description

Warnings for a module

Synopsis

- data Warnings
  - = NoWarnings
  - | WarnAll WarningTxt
  - | WarnSome [(OccName, WarningTxt)]
- data WarningTxt
  - = WarningTxt (Located SourceText) [Located StringLiteral]
  - | DeprecatedTxt (Located SourceText) [Located StringLiteral]
- pprWarningTxtForMsg :: WarningTxt -> SDoc
- mkIfaceWarnCache :: Warnings -> OccName -> Maybe WarningTxt
- emptyIfaceWarnCache :: OccName -> Maybe WarningTxt
- plusWarns :: Warnings -> Warnings -> Warnings

# Documentation

data Warnings Source #

Warning information for a module

Constructors

NoWarnings | Nothing deprecated
WarnAll WarningTxt | Whole module deprecated
WarnSome [(OccName, WarningTxt)] | Some specific things deprecated

#### Instances

Instances details

Binary Warnings # |
Instance details Defined in GHC.Unit.Module.Warnings Methods put_ :: BinHandle -> Warnings -> IO () Source # put :: BinHandle -> Warnings -> IO (Bin Warnings) Source # get :: BinHandle -> IO Warnings Source #
Outputable Warnings # |
Instance details Defined in GHC.Iface.Load Methods ppr :: Warnings -> SDoc Source #
Eq Warnings # |
Instance details Defined in GHC.Unit.Module.Warnings Methods (==) :: Warnings -> Warnings -> Bool # (/=) :: Warnings -> Warnings -> Bool #

data WarningTxt Source #

Warning Text

reason/explanation from a WARNING or DEPRECATED pragma

Constructors

WarningTxt (Located SourceText) [Located StringLiteral] |
DeprecatedTxt (Located SourceText) [Located StringLiteral] |

#### Instances

Instances details

Data WarningTxt # |
Instance details Defined in GHC.Unit.Module.Warnings Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WarningTxt -> c WarningTxt Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WarningTxt Source # toConstr :: WarningTxt -> Constr Source # dataTypeOf :: WarningTxt -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WarningTxt) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WarningTxt) Source # gmapT :: (forall b. Data b => b -> b) -> WarningTxt -> WarningTxt Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WarningTxt -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WarningTxt -> r Source # gmapQ :: (forall d. Data d => d -> u) -> WarningTxt -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> WarningTxt -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WarningTxt -> m WarningTxt Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WarningTxt -> m WarningTxt Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WarningTxt -> m WarningTxt Source #
Binary WarningTxt # |
Instance details Defined in GHC.Unit.Module.Warnings Methods put_ :: BinHandle -> WarningTxt -> IO () Source # put :: BinHandle -> WarningTxt -> IO (Bin WarningTxt) Source # get :: BinHandle -> IO WarningTxt Source #
Outputable WarningTxt # |
Instance details Defined in GHC.Unit.Module.Warnings Methods ppr :: WarningTxt -> SDoc Source #
Eq WarningTxt # |
Instance details Defined in GHC.Unit.Module.Warnings Methods (==) :: WarningTxt -> WarningTxt -> Bool # (/=) :: WarningTxt -> WarningTxt -> Bool #

pprWarningTxtForMsg :: WarningTxt -> SDoc Source #

mkIfaceWarnCache :: Warnings -> OccName -> Maybe WarningTxt Source #

Constructs the cache for the `mi_warn_fn` field of a `ModIface`

emptyIfaceWarnCache :: OccName -> Maybe WarningTxt Source #

plusWarns :: Warnings -> Warnings -> Warnings Source #