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

Safe HaskellNone
LanguageHaskell2010

TyCoPpr

Contents

Description

Pretty-printing types and coercions.

Synopsis

Pretty-printing

pprUserForAll :: [TyCoVarBinder] -> SDoc Source #

Print a user-level forall; see Note [When to print foralls] in this module.

newtype PprPrec Source #

A general-purpose pretty-printing precedence type.

Constructors

PprPrec Int 
Instances
Eq PprPrec Source # 
Instance details

Defined in BasicTypes

Methods

(==) :: PprPrec -> PprPrec -> Bool #

(/=) :: PprPrec -> PprPrec -> Bool #

Ord PprPrec Source # 
Instance details

Defined in BasicTypes

Show PprPrec Source # 
Instance details

Defined in BasicTypes

pprWithExplicitKindsWhen :: Bool -> SDoc -> SDoc Source #

Display all kind information (with -fprint-explicit-kinds) when the provided Bool argument is True. See Note [Kind arguments in error messages] in TcErrors.

debugPprType :: Type -> SDoc Source #

debugPprType is a simple pretty printer that prints a type without going through IfaceType. It does not format as prettily as the normal route, but it's much more direct, and that can be useful for debugging. E.g. with -dppr-debug it prints the kind on type-variable occurrences which the normal route fundamentally cannot do.