ghc-9.6.3: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Unit.Module.Warnings

Description

Warnings for a module

Synopsis

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

# Documentation

data Warnings pass Source #

Warning information for a module

Constructors

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

#### Instances

Instances details

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

data WarningTxt pass Source #

Warning Text

reason/explanation from a WARNING or DEPRECATED pragma

Constructors

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

#### Instances

Instances details

(Data pass, Data (IdP pass)) => Data (WarningTxt pass) Source # |

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 pass -> c (WarningTxt pass) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WarningTxt pass) Source #

toConstr :: WarningTxt pass -> Constr Source #

dataTypeOf :: WarningTxt pass -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WarningTxt pass)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WarningTxt pass)) Source #

gmapT :: (forall b. Data b => b -> b) -> WarningTxt pass -> WarningTxt pass Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WarningTxt pass -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WarningTxt pass -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> WarningTxt pass -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WarningTxt pass -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> WarningTxt pass -> m (WarningTxt pass) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WarningTxt pass -> m (WarningTxt pass) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WarningTxt pass -> m (WarningTxt pass) Source #

Generic (WarningTxt pass) Source # |
Instance details Defined in GHC.Unit.Module.Warnings Associated Types type Rep (WarningTxt pass) :: Type -> Type Source # Methods from :: WarningTxt pass -> Rep (WarningTxt pass) x Source # to :: Rep (WarningTxt pass) x -> WarningTxt pass Source #
Binary (WarningTxt GhcRn) Source # |
Instance details Defined in GHC.Unit.Module.Warnings Methods put_ :: BinHandle -> WarningTxt GhcRn -> IO () Source # put :: BinHandle -> WarningTxt GhcRn -> IO (Bin (WarningTxt GhcRn)) Source # get :: BinHandle -> IO (WarningTxt GhcRn) Source #
Outputable (WarningTxt pass) Source # |
Instance details Defined in GHC.Unit.Module.Warnings Methods ppr :: WarningTxt pass -> SDoc Source #
Eq (IdP pass) => Eq (WarningTxt pass) Source # |
Instance details Defined in GHC.Unit.Module.Warnings Methods (==) :: WarningTxt pass -> WarningTxt pass -> Bool # (/=) :: WarningTxt pass -> WarningTxt pass -> Bool #
type Rep (WarningTxt pass) Source # |

Instance details

Defined in GHC.Unit.Module.Warnings

type Rep (WarningTxt pass) = D1 ('MetaData "WarningTxt" "GHC.Unit.Module.Warnings" "ghc" 'False) (C1 ('MetaCons "WarningTxt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located SourceText)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Located (WithHsDocIdentifiers StringLiteral pass)])) :+: C1 ('MetaCons "DeprecatedTxt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located SourceText)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Located (WithHsDocIdentifiers StringLiteral pass)])))

pprWarningTxtForMsg :: WarningTxt p -> SDoc Source #

mkIfaceWarnCache :: Warnings p -> OccName -> Maybe (WarningTxt p) Source #

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

emptyIfaceWarnCache :: OccName -> Maybe (WarningTxt p) Source #

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