GHC.Iface.Errors.Ppr

ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Iface.Errors.Ppr

Contents

- Orphan instances

Synopsis

- data IfaceMessageOpts = IfaceMessageOpts {
  - ifaceShowTriedFiles :: !Bool
  - ifaceBuildingCabalPackage :: !BuildingCabalPackage
  }
- interfaceErrorHints :: IfaceMessage -> [GhcHint]
- interfaceErrorReason :: IfaceMessage -> DiagnosticReason
- interfaceErrorDiagnostic :: IfaceMessageOpts -> IfaceMessage -> SDoc
- missingInterfaceErrorHints :: MissingInterfaceError -> [GhcHint]
- missingInterfaceErrorReason :: MissingInterfaceError -> DiagnosticReason
- missingInterfaceErrorDiagnostic :: IfaceMessageOpts -> MissingInterfaceError -> SDoc
- readInterfaceErrorDiagnostic :: ReadInterfaceError -> SDoc
- lookingForHerald :: InterfaceLookingFor -> SDoc
- cantFindErrorX :: (UnitInfo -> SDoc) -> ([FilePath] -> SDoc) -> FindingModuleOrInterface -> CantFindInstalled -> SDoc
- mayShowLocations :: String -> Bool -> [FilePath] -> SDoc
- pkgHiddenHint :: (UnitInfo -> SDoc) -> BuildingCabalPackage -> UnitInfo -> SDoc

# Documentation

data IfaceMessageOpts #

Constructors

IfaceMessageOpts |
Fields ifaceShowTriedFiles :: !Bool Whether to show files we tried to look for or not when printing loader errors ifaceBuildingCabalPackage :: !BuildingCabalPackage

#### Instances

Instances details

HasDefaultDiagnosticOpts IfaceMessageOpts # |
Instance details Defined in GHC.Iface.Errors.Ppr Methods defaultOpts :: IfaceMessageOpts #

interfaceErrorHints :: IfaceMessage -> [GhcHint] #

interfaceErrorReason :: IfaceMessage -> DiagnosticReason #

interfaceErrorDiagnostic :: IfaceMessageOpts -> IfaceMessage -> SDoc #

missingInterfaceErrorHints :: MissingInterfaceError -> [GhcHint] #

missingInterfaceErrorReason :: MissingInterfaceError -> DiagnosticReason #

missingInterfaceErrorDiagnostic :: IfaceMessageOpts -> MissingInterfaceError -> SDoc #

readInterfaceErrorDiagnostic :: ReadInterfaceError -> SDoc #

lookingForHerald :: InterfaceLookingFor -> SDoc #

cantFindErrorX :: (UnitInfo -> SDoc) -> ([FilePath] -> SDoc) -> FindingModuleOrInterface -> CantFindInstalled -> SDoc #

General version of cantFindError which has some holes which allow GHC/GHCi to display slightly different error messages.

mayShowLocations :: String -> Bool -> [FilePath] -> SDoc #

pkgHiddenHint :: (UnitInfo -> SDoc) -> BuildingCabalPackage -> UnitInfo -> SDoc #

# Orphan instances

Diagnostic IfaceMessage # |
Instance details Associated Types
type DiagnosticOpts IfaceMessage |
Instance details Defined in GHC.Iface.Errors.Ppr type DiagnosticOpts IfaceMessage = IfaceMessageOpts
type DiagnosticHint IfaceMessage |
Instance details Defined in GHC.Iface.Errors.Ppr type DiagnosticHint IfaceMessage = GhcHint
Methods diagnosticMessage :: DiagnosticOpts IfaceMessage -> IfaceMessage -> DecoratedSDoc # diagnosticReason :: IfaceMessage -> DiagnosticReason # diagnosticHints :: IfaceMessage -> [DiagnosticHint IfaceMessage] # diagnosticCode :: IfaceMessage -> Maybe DiagnosticCode #
HasDefaultDiagnosticOpts IfaceMessageOpts # |
Instance details Methods defaultOpts :: IfaceMessageOpts #