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

Safe Haskell | Ignore
Language | GHC2021

GHC.Types.Name.Ppr

Synopsis

- mkNamePprCtx :: Outputable info => PromotionTickContext -> UnitEnv -> GlobalRdrEnvX info -> NamePprCtx
- mkQualModule :: UnitState -> Maybe HomeUnit -> QueryQualifyModule
- mkQualPackage :: UnitState -> QueryQualifyPackage
- pkgQual :: UnitState -> NamePprCtx

# Documentation

mkNamePprCtx :: Outputable info => PromotionTickContext -> UnitEnv -> GlobalRdrEnvX info -> NamePprCtx #

Creates some functions that work out the best ways to format names for the user according to a set of heuristics.

mkQualModule :: UnitState -> Maybe HomeUnit -> QueryQualifyModule #

Creates a function for formatting modules based on two heuristics: (1) if the module is the current module, don't qualify, and (2) if there is only one exposed package which exports this module, don't qualify.

mkQualPackage :: UnitState -> QueryQualifyPackage #

Creates a function for formatting packages based on two heuristics: (1) don't qualify if the package in question is "main", and (2) only qualify with a unit id if the package ID would be ambiguous.

pkgQual :: UnitState -> NamePprCtx #

A function which only qualifies package names if necessary; but qualifies all other identifiers.