ghc-9.10.3: The GHC API

Safe Haskell | None
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 Source #

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 Source # |
Instance details Defined in GHC.Iface.Errors.Ppr Methods defaultOpts :: IfaceMessageOpts Source #

interfaceErrorHints :: IfaceMessage -> [GhcHint] Source #

interfaceErrorReason :: IfaceMessage -> DiagnosticReason Source #

interfaceErrorDiagnostic :: IfaceMessageOpts -> IfaceMessage -> SDoc Source #

missingInterfaceErrorHints :: MissingInterfaceError -> [GhcHint] Source #

missingInterfaceErrorReason :: MissingInterfaceError -> DiagnosticReason Source #

missingInterfaceErrorDiagnostic :: IfaceMessageOpts -> MissingInterfaceError -> SDoc Source #

readInterfaceErrorDiagnostic :: ReadInterfaceError -> SDoc Source #

lookingForHerald :: InterfaceLookingFor -> SDoc Source #

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

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

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

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

# Orphan instances

Diagnostic IfaceMessage Source # |

Instance details

Associated Types

type DiagnosticOpts IfaceMessage |
Instance details Defined in GHC.Iface.Errors.Ppr type DiagnosticOpts IfaceMessage = IfaceMessageOpts

Methods

diagnosticMessage :: DiagnosticOpts IfaceMessage -> IfaceMessage -> DecoratedSDoc Source #

diagnosticReason :: IfaceMessage -> DiagnosticReason Source #

diagnosticHints :: IfaceMessage -> [GhcHint] Source #

diagnosticCode :: IfaceMessage -> Maybe DiagnosticCode Source #

HasDefaultDiagnosticOpts IfaceMessageOpts Source # |
Instance details Methods defaultOpts :: IfaceMessageOpts Source #