ghc-8.4.3: The GHC API

Safe HaskellNone
LanguageHaskell2010

Outputable

Contents

Description

This module defines classes and functions for pretty-printing. It also exports a number of helpful debugging and other utilities such as trace and panic.

The interface to this module is very similar to the standard Hughes-PJ pretty printing module, except that it exports a number of additional functions that are rarely used, and works over the SDoc type.

Synopsis

Type classes

class Outputable a where #

Class designating that some type has an SDoc representation

Methods

ppr :: a -> SDoc #

pprPrec :: Rational -> a -> SDoc #

Instances
Outputable Bool # 
Instance details

Defined in Outputable

Methods

ppr :: Bool -> SDoc #

pprPrec :: Rational -> Bool -> SDoc #

Outputable Char # 
Instance details

Defined in Outputable

Methods

ppr :: Char -> SDoc #

pprPrec :: Rational -> Char -> SDoc #

Outputable Int # 
Instance details

Defined in Outputable

Methods

ppr :: Int -> SDoc #

pprPrec :: Rational -> Int -> SDoc #

Outputable Int32 # 
Instance details

Defined in Outputable

Methods

ppr :: Int32 -> SDoc #

pprPrec :: Rational -> Int32 -> SDoc #

Outputable Int64 # 
Instance details

Defined in Outputable

Methods

ppr :: Int64 -> SDoc #

pprPrec :: Rational -> Int64 -> SDoc #

Outputable Integer # 
Instance details

Defined in Outputable

Methods

ppr :: Integer -> SDoc #

pprPrec :: Rational -> Integer -> SDoc #

Outputable Ordering # 
Instance details

Defined in Outputable

Outputable Word # 
Instance details

Defined in Outputable

Methods

ppr :: Word -> SDoc #

pprPrec :: Rational -> Word -> SDoc #

Outputable Word16 # 
Instance details

Defined in Outputable

Methods

ppr :: Word16 -> SDoc #

pprPrec :: Rational -> Word16 -> SDoc #

Outputable Word32 # 
Instance details

Defined in Outputable

Methods

ppr :: Word32 -> SDoc #

pprPrec :: Rational -> Word32 -> SDoc #

Outputable () # 
Instance details

Defined in Outputable

Methods

ppr :: () -> SDoc #

pprPrec :: Rational -> () -> SDoc #

Outputable Fingerprint # 
Instance details

Defined in Outputable

Outputable Extension # 
Instance details

Defined in Outputable

Outputable Serialized # 
Instance details

Defined in Outputable

Outputable Name # 
Instance details

Defined in Name

Methods

ppr :: Name -> SDoc #

pprPrec :: Rational -> Name -> SDoc #

Outputable OccName # 
Instance details

Defined in OccName

Methods

ppr :: OccName -> SDoc #

pprPrec :: Rational -> OccName -> SDoc #

Outputable PrimOp # 
Instance details

Defined in PrimOp

Methods

ppr :: PrimOp -> SDoc #

pprPrec :: Rational -> PrimOp -> SDoc #

Outputable TyCon # 
Instance details

Defined in TyCon

Methods

ppr :: TyCon -> SDoc #

pprPrec :: Rational -> TyCon -> SDoc #

Outputable FastString # 
Instance details

Defined in Outputable

Outputable ComponentId # 
Instance details

Defined in Module

Outputable InstalledUnitId # 
Instance details

Defined in Module

Outputable UnitId # 
Instance details

Defined in Module

Methods

ppr :: UnitId -> SDoc #

pprPrec :: Rational -> UnitId -> SDoc #

Outputable ModuleName # 
Instance details

Defined in Module

Outputable Module # 
Instance details

Defined in Module

Methods

ppr :: Module -> SDoc #

pprPrec :: Rational -> Module -> SDoc #

Outputable QualifyName # 
Instance details

Defined in Outputable

Outputable PprStyle # 
Instance details

Defined in Outputable

Outputable TyBinder # 
Instance details

Defined in TyCoRep

Outputable TCvSubst # 
Instance details

Defined in TyCoRep

Outputable UnivCoProvenance # 
Instance details

Defined in TyCoRep

Outputable Coercion # 
Instance details

Defined in TyCoRep

Outputable TyThing # 
Instance details

Defined in TyCoRep

Methods

ppr :: TyThing -> SDoc #

pprPrec :: Rational -> TyThing -> SDoc #

Outputable Type # 
Instance details

Defined in TyCoRep

Methods

ppr :: Type -> SDoc #

pprPrec :: Rational -> Type -> SDoc #

Outputable MetaDetails # 
Instance details

Defined in TcType

Outputable SrcSpan # 
Instance details

Defined in SrcLoc

Methods

ppr :: SrcSpan -> SDoc #

pprPrec :: Rational -> SrcSpan -> SDoc #

Outputable RealSrcSpan # 
Instance details

Defined in SrcLoc

Outputable SrcLoc # 
Instance details

Defined in SrcLoc

Methods

ppr :: SrcLoc -> SDoc #

pprPrec :: Rational -> SrcLoc -> SDoc #

Outputable RealSrcLoc # 
Instance details

Defined in SrcLoc

Outputable IdDetails # 
Instance details

Defined in IdInfo

Outputable HsDocString # 
Instance details

Defined in HsDoc

Outputable IntWithInf # 
Instance details

Defined in BasicTypes

Outputable FractionalLit # 
Instance details

Defined in BasicTypes

Outputable IntegralLit # 
Instance details

Defined in BasicTypes

Outputable InlineSpec # 
Instance details

Defined in BasicTypes

Outputable InlinePragma # 
Instance details

Defined in BasicTypes

Outputable RuleMatchInfo # 
Instance details

Defined in BasicTypes

Outputable Activation # 
Instance details

Defined in BasicTypes

Outputable CompilerPhase # 
Instance details

Defined in BasicTypes

Outputable SourceText # 
Instance details

Defined in BasicTypes

Outputable SuccessFlag # 
Instance details

Defined in BasicTypes

Outputable TailCallInfo # 
Instance details

Defined in BasicTypes

Outputable OccInfo # 
Instance details

Defined in BasicTypes

Methods

ppr :: OccInfo -> SDoc #

pprPrec :: Rational -> OccInfo -> SDoc #

Outputable OverlapMode # 
Instance details

Defined in BasicTypes

Outputable OverlapFlag # 
Instance details

Defined in BasicTypes

Outputable DerivStrategy # 
Instance details

Defined in BasicTypes

Outputable Origin # 
Instance details

Defined in BasicTypes

Methods

ppr :: Origin -> SDoc #

pprPrec :: Rational -> Origin -> SDoc #

Outputable RecFlag # 
Instance details

Defined in BasicTypes

Methods

ppr :: RecFlag -> SDoc #

pprPrec :: Rational -> RecFlag -> SDoc #

Outputable Boxity # 
Instance details

Defined in BasicTypes

Methods

ppr :: Boxity -> SDoc #

pprPrec :: Rational -> Boxity -> SDoc #

Outputable TopLevelFlag # 
Instance details

Defined in BasicTypes

Outputable LexicalFixity # 
Instance details

Defined in BasicTypes

Outputable FixityDirection # 
Instance details

Defined in BasicTypes

Outputable Fixity # 
Instance details

Defined in BasicTypes

Methods

ppr :: Fixity -> SDoc #

pprPrec :: Rational -> Fixity -> SDoc #

Outputable WarningTxt # 
Instance details

Defined in BasicTypes

Outputable StringLiteral # 
Instance details

Defined in BasicTypes

Outputable FunctionOrData # 
Instance details

Defined in BasicTypes

Outputable SwapFlag # 
Instance details

Defined in BasicTypes

Outputable OneShotInfo # 
Instance details

Defined in BasicTypes

Outputable LeftOrRight # 
Instance details

Defined in BasicTypes

Outputable Unique # 
Instance details

Defined in Unique

Methods

ppr :: Unique -> SDoc #

pprPrec :: Rational -> Unique -> SDoc #

Outputable RegClass # 
Instance details

Defined in RegClass

Outputable Reg #

Print a reg in a generic manner If you want the architecture specific names, then use the pprReg function from the appropriate Ppr module.

Instance details

Defined in Reg

Methods

ppr :: Reg -> SDoc #

pprPrec :: Rational -> Reg -> SDoc #

Outputable RealReg # 
Instance details

Defined in Reg

Methods

ppr :: RealReg -> SDoc #

pprPrec :: Rational -> RealReg -> SDoc #

Outputable VirtualReg # 
Instance details

Defined in Reg

Outputable LabelSet # 
Instance details

Defined in Hoopl.Label

Outputable Label # 
Instance details

Defined in Hoopl.Label

Methods

ppr :: Label -> SDoc #

pprPrec :: Rational -> Label -> SDoc #

Outputable DefUnitId # 
Instance details

Defined in Module

Outputable InstalledModule # 
Instance details

Defined in Module

Outputable IndefModule # 
Instance details

Defined in Module

Outputable IndefUnitId # 
Instance details

Defined in Module

Outputable ModLocation # 
Instance details

Defined in Module

Outputable PackageName # 
Instance details

Defined in PackageConfig

Outputable SourcePackageId # 
Instance details

Defined in PackageConfig

Outputable CType # 
Instance details

Defined in ForeignCall

Methods

ppr :: CType -> SDoc #

pprPrec :: Rational -> CType -> SDoc #

Outputable Header # 
Instance details

Defined in ForeignCall

Methods

ppr :: Header -> SDoc #

pprPrec :: Rational -> Header -> SDoc #

Outputable CCallConv # 
Instance details

Defined in ForeignCall

Outputable CCallSpec # 
Instance details

Defined in ForeignCall

Outputable CExportSpec # 
Instance details

Defined in ForeignCall

Outputable Safety # 
Instance details

Defined in ForeignCall

Methods

ppr :: Safety -> SDoc #

pprPrec :: Rational -> Safety -> SDoc #

Outputable ForeignCall # 
Instance details

Defined in ForeignCall

Outputable Phase # 
Instance details

Defined in DriverPhases

Methods

ppr :: Phase -> SDoc #

pprPrec :: Rational -> Phase -> SDoc #

Outputable WarnReason # 
Instance details

Defined in CmdLineParser

Outputable PackageFlag # 
Instance details

Defined in DynFlags

Outputable ModRenaming # 
Instance details

Defined in DynFlags

Outputable PackageArg # 
Instance details

Defined in DynFlags

Outputable GhcMode # 
Instance details

Defined in DynFlags

Methods

ppr :: GhcMode -> SDoc #

pprPrec :: Rational -> GhcMode -> SDoc #

Outputable SafeHaskellMode # 
Instance details

Defined in DynFlags

Outputable Language # 
Instance details

Defined in DynFlags

Outputable WarnReason # 
Instance details

Defined in DynFlags

Outputable ArgDescr # 
Instance details

Defined in SMRep

Outputable ClosureTypeInfo # 
Instance details

Defined in SMRep

Outputable SMRep # 
Instance details

Defined in SMRep

Methods

ppr :: SMRep -> SDoc #

pprPrec :: Rational -> SMRep -> SDoc #

Outputable StgHalfWord # 
Instance details

Defined in SMRep

Outputable StgWord # 
Instance details

Defined in SMRep

Methods

ppr :: StgWord -> SDoc #

pprPrec :: Rational -> StgWord -> SDoc #

Outputable Annotation # 
Instance details

Defined in Annotations

Outputable ModuleOrigin # 
Instance details

Defined in Packages

Outputable ForeignHint # 
Instance details

Defined in PprCmmDecl

Outputable Width # 
Instance details

Defined in CmmType

Methods

ppr :: Width -> SDoc #

pprPrec :: Rational -> Width -> SDoc #

Outputable CmmType # 
Instance details

Defined in CmmType

Methods

ppr :: CmmType -> SDoc #

pprPrec :: Rational -> CmmType -> SDoc #

Outputable AvailInfo # 
Instance details

Defined in Avail

Outputable ImportSpec # 
Instance details

Defined in RdrName

Outputable Parent # 
Instance details

Defined in RdrName

Methods

ppr :: Parent -> SDoc #

pprPrec :: Rational -> Parent -> SDoc #

Outputable GlobalRdrElt # 
Instance details

Defined in RdrName

Outputable LocalRdrEnv # 
Instance details

Defined in RdrName

Outputable RdrName # 
Instance details

Defined in RdrName

Methods

ppr :: RdrName -> SDoc #

pprPrec :: Rational -> RdrName -> SDoc #

Outputable AnnotationComment # 
Instance details

Defined in ApiAnnotation

Outputable AnnKeywordId # 
Instance details

Defined in ApiAnnotation

Outputable Token # 
Instance details

Defined in Lexer

Methods

ppr :: Token -> SDoc #

pprPrec :: Rational -> Token -> SDoc #

Outputable ArgFlag # 
Instance details

Defined in Var

Methods

ppr :: ArgFlag -> SDoc #

pprPrec :: Rational -> ArgFlag -> SDoc #

Outputable Var # 
Instance details

Defined in Var

Methods

ppr :: Var -> SDoc #

pprPrec :: Rational -> Var -> SDoc #

Outputable PatSyn # 
Instance details

Defined in PatSyn

Methods

ppr :: PatSyn -> SDoc #

pprPrec :: Rational -> PatSyn -> SDoc #

Outputable IfaceCoercion # 
Instance details

Defined in IfaceType

Outputable IfaceTyLit # 
Instance details

Defined in IfaceType

Outputable IfaceTyCon # 
Instance details

Defined in IfaceType

Outputable IfaceType # 
Instance details

Defined in IfaceType

Outputable IfaceTcArgs # 
Instance details

Defined in IfaceType

Outputable EqSpec # 
Instance details

Defined in DataCon

Methods

ppr :: EqSpec -> SDoc #

pprPrec :: Rational -> EqSpec -> SDoc #

Outputable DataCon # 
Instance details

Defined in DataCon

Methods

ppr :: DataCon -> SDoc #

pprPrec :: Rational -> DataCon -> SDoc #

Outputable ConLike # 
Instance details

Defined in ConLike

Methods

ppr :: ConLike -> SDoc #

pprPrec :: Rational -> ConLike -> SDoc #

Outputable CostCentreStack # 
Instance details

Defined in CostCentre

Outputable CostCentre # 
Instance details

Defined in CostCentre

Outputable CoAxiomRule # 
Instance details

Defined in CoAxiom

Outputable Role # 
Instance details

Defined in CoAxiom

Methods

ppr :: Role -> SDoc #

pprPrec :: Rational -> Role -> SDoc #

Outputable CoAxBranch # 
Instance details

Defined in CoAxiom

Outputable LiftingContext # 
Instance details

Defined in Coercion

Outputable Class # 
Instance details

Defined in Class

Methods

ppr :: Class -> SDoc #

pprPrec :: Rational -> Class -> SDoc #

Outputable TyConFlavour # 
Instance details

Defined in TyCon

Outputable PrimElemRep # 
Instance details

Defined in TyCon

Outputable PrimRep # 
Instance details

Defined in TyCon

Methods

ppr :: PrimRep -> SDoc #

pprPrec :: Rational -> PrimRep -> SDoc #

Outputable FamTyConFlav # 
Instance details

Defined in TyCon

Outputable AlgTyConFlav # 
Instance details

Defined in TyCon

Outputable IfaceBndr # 
Instance details

Defined in IfaceType

Outputable InScopeSet # 
Instance details

Defined in VarEnv

Outputable CoercionHole # 
Instance details

Defined in TyCoRep

Outputable EqRel # 
Instance details

Defined in Type

Methods

ppr :: EqRel -> SDoc #

pprPrec :: Rational -> EqRel -> SDoc #

Outputable Literal # 
Instance details

Defined in Literal

Methods

ppr :: Literal -> SDoc #

pprPrec :: Rational -> Literal -> SDoc #

Outputable StrictnessMark # 
Instance details

Defined in DataCon

Outputable SrcUnpackedness # 
Instance details

Defined in DataCon

Outputable SrcStrictness # 
Instance details

Defined in DataCon

Outputable HsImplBang # 
Instance details

Defined in DataCon

Outputable HsSrcBang # 
Instance details

Defined in DataCon

Outputable SlotTy # 
Instance details

Defined in RepType

Methods

ppr :: SlotTy -> SDoc #

pprPrec :: Rational -> SlotTy -> SDoc #

Outputable StrictSig # 
Instance details

Defined in Demand

Outputable DmdType # 
Instance details

Defined in Demand

Methods

ppr :: DmdType -> SDoc #

pprPrec :: Rational -> DmdType -> SDoc #

Outputable CPRResult # 
Instance details

Defined in Demand

Outputable TypeShape # 
Instance details

Defined in Demand

Outputable Count # 
Instance details

Defined in Demand

Methods

ppr :: Count -> SDoc #

pprPrec :: Rational -> Count -> SDoc #

Outputable UseDmd # 
Instance details

Defined in Demand

Methods

ppr :: UseDmd -> SDoc #

pprPrec :: Rational -> UseDmd -> SDoc #

Outputable StrDmd # 
Instance details

Defined in Demand

Methods

ppr :: StrDmd -> SDoc #

pprPrec :: Rational -> StrDmd -> SDoc #

Outputable UnfoldingGuidance # 
Instance details

Defined in PprCore

Outputable UnfoldingSource # 
Instance details

Defined in PprCore

Outputable Unfolding # 
Instance details

Defined in PprCore

Outputable CoreVect # 
Instance details

Defined in PprCore

Outputable CoreRule # 
Instance details

Defined in PprCore

Outputable AltCon # 
Instance details

Defined in CoreSyn

Methods

ppr :: AltCon -> SDoc #

pprPrec :: Rational -> AltCon -> SDoc #

Outputable FamInstMatch # 
Instance details

Defined in FamInstEnv

Outputable FamInst # 
Instance details

Defined in FamInstEnv

Methods

ppr :: FamInst -> SDoc #

pprPrec :: Rational -> FamInst -> SDoc #

Outputable LevityInfo # 
Instance details

Defined in IdInfo

Outputable TickBoxOp # 
Instance details

Defined in IdInfo

Outputable CafInfo # 
Instance details

Defined in IdInfo

Methods

ppr :: CafInfo -> SDoc #

pprPrec :: Rational -> CafInfo -> SDoc #

Outputable RecSelParent # 
Instance details

Defined in IdInfo

Outputable UnVarGraph # 
Instance details

Defined in UnVarGraph

Outputable UnVarSet # 
Instance details

Defined in UnVarGraph

Outputable PrimCall # 
Instance details

Defined in PrimOp

Outputable CgBreakInfo # 
Instance details

Defined in ByteCodeTypes

Outputable UnlinkedBCO # 
Instance details

Defined in ByteCodeTypes

Outputable CompiledByteCode # 
Instance details

Defined in ByteCodeTypes

Outputable CoreStats # 
Instance details

Defined in CoreStats

Outputable UpdateFlag # 
Instance details

Defined in StgSyn

Outputable AltType # 
Instance details

Defined in StgSyn

Methods

ppr :: AltType -> SDoc #

pprPrec :: Rational -> AltType -> SDoc #

Outputable ShowHowMuch # 
Instance details

Defined in IfaceSyn

Outputable IfaceJoinInfo # 
Instance details

Defined in IfaceSyn

Outputable IfaceConAlt # 
Instance details

Defined in IfaceSyn

Outputable IfaceExpr # 
Instance details

Defined in IfaceSyn

Outputable IfaceIdDetails # 
Instance details

Defined in IfaceSyn

Outputable IfaceUnfolding # 
Instance details

Defined in IfaceSyn

Outputable IfaceInfoItem # 
Instance details

Defined in IfaceSyn

Outputable IfaceIdInfo # 
Instance details

Defined in IfaceSyn

Outputable IfaceCompleteMatch # 
Instance details

Defined in IfaceSyn

Outputable IfaceAnnotation # 
Instance details

Defined in IfaceSyn

Outputable IfaceRule # 
Instance details

Defined in IfaceSyn

Outputable IfaceFamInst # 
Instance details

Defined in IfaceSyn

Outputable IfaceClsInst # 
Instance details

Defined in IfaceSyn

Outputable IfaceAT # 
Instance details

Defined in IfaceSyn

Methods

ppr :: IfaceAT -> SDoc #

pprPrec :: Rational -> IfaceAT -> SDoc #

Outputable IfaceClassOp # 
Instance details

Defined in IfaceSyn

Outputable IfaceTyConParent # 
Instance details

Defined in IfaceSyn

Outputable IfaceDecl # 
Instance details

Defined in IfaceSyn

Outputable ForeignLabelSource # 
Instance details

Defined in CLabel

Outputable CLabel # 
Instance details

Defined in CLabel

Methods

ppr :: CLabel -> SDoc #

pprPrec :: Rational -> CLabel -> SDoc #

Outputable GlobalReg # 
Instance details

Defined in PprCmmExpr

Outputable LocalReg # 
Instance details

Defined in PprCmmExpr

Outputable CmmLit # 
Instance details

Defined in PprCmmExpr

Methods

ppr :: CmmLit -> SDoc #

pprPrec :: Rational -> CmmLit -> SDoc #

Outputable Area # 
Instance details

Defined in PprCmmExpr

Methods

ppr :: Area -> SDoc #

pprPrec :: Rational -> Area -> SDoc #

Outputable CmmReg # 
Instance details

Defined in PprCmmExpr

Methods

ppr :: CmmReg -> SDoc #

pprPrec :: Rational -> CmmReg -> SDoc #

Outputable CmmExpr # 
Instance details

Defined in PprCmmExpr

Methods

ppr :: CmmExpr -> SDoc #

pprPrec :: Rational -> CmmExpr -> SDoc #

Outputable CmmTickScope # 
Instance details

Defined in CmmNode

Outputable ForeignTarget # 
Instance details

Defined in PprCmm

Outputable CmmReturnInfo # 
Instance details

Defined in PprCmm

Outputable ForeignConvention # 
Instance details

Defined in PprCmm

Outputable Convention # 
Instance details

Defined in PprCmm

Outputable CmmStatics # 
Instance details

Defined in PprCmmDecl

Outputable CmmStatic # 
Instance details

Defined in PprCmmDecl

Outputable C_SRT # 
Instance details

Defined in PprCmmDecl

Methods

ppr :: C_SRT -> SDoc #

pprPrec :: Rational -> C_SRT -> SDoc #

Outputable CmmInfoTable # 
Instance details

Defined in PprCmmDecl

Outputable CmmStackInfo # 
Instance details

Defined in PprCmm

Outputable CmmTopInfo # 
Instance details

Defined in PprCmm

Outputable CmmGraph # 
Instance details

Defined in PprCmm

Outputable LlvmCastOp # 
Instance details

Defined in Llvm.Types

Outputable LlvmCmpOp # 
Instance details

Defined in Llvm.Types

Outputable LlvmMachOp # 
Instance details

Defined in Llvm.Types

Outputable LlvmLinkageType # 
Instance details

Defined in Llvm.Types

Outputable LlvmCallConvention # 
Instance details

Defined in Llvm.Types

Outputable LlvmFuncAttr # 
Instance details

Defined in Llvm.Types

Outputable LlvmParamAttr # 
Instance details

Defined in Llvm.Types

Outputable LlvmFunctionDecl # 
Instance details

Defined in Llvm.Types

Outputable LlvmStatic # 
Instance details

Defined in Llvm.Types

Outputable LlvmLit # 
Instance details

Defined in Llvm.Types

Methods

ppr :: LlvmLit -> SDoc #

pprPrec :: Rational -> LlvmLit -> SDoc #

Outputable LlvmVar # 
Instance details

Defined in Llvm.Types

Methods

ppr :: LlvmVar -> SDoc #

pprPrec :: Rational -> LlvmVar -> SDoc #

Outputable LlvmType # 
Instance details

Defined in Llvm.Types

Outputable MetaExpr # 
Instance details

Defined in Llvm.MetaData

Outputable MetaId # 
Instance details

Defined in Llvm.MetaData

Methods

ppr :: MetaId -> SDoc #

pprPrec :: Rational -> MetaId -> SDoc #

Outputable LiveInfo # 
Instance details

Defined in RegAlloc.Liveness

Outputable Loc # 
Instance details

Defined in RegAlloc.Linear.Base

Methods

ppr :: Loc -> SDoc #

pprPrec :: Rational -> Loc -> SDoc #

Outputable SpillStats # 
Instance details

Defined in RegAlloc.Graph.Spill

Outputable UnwindExpr # 
Instance details

Defined in Debug

Outputable UnwindPoint # 
Instance details

Defined in Debug

Outputable DebugBlock # 
Instance details

Defined in Debug

Outputable Status # 
Instance details

Defined in CmmProcPoint

Methods

ppr :: Status -> SDoc #

pprPrec :: Rational -> Status -> SDoc #

Outputable ParamLocation # 
Instance details

Defined in CmmCallConv

Outputable TopSRT # 
Instance details

Defined in CmmBuildInfoTables

Methods

ppr :: TopSRT -> SDoc #

pprPrec :: Rational -> TopSRT -> SDoc #

Outputable CandidatesQTvs # 
Instance details

Defined in TcType

Outputable TcLevel # 
Instance details

Defined in TcType

Methods

ppr :: TcLevel -> SDoc #

pprPrec :: Rational -> TcLevel -> SDoc #

Outputable InferResult # 
Instance details

Defined in TcType

Outputable ExpType # 
Instance details

Defined in TcType

Methods

ppr :: ExpType -> SDoc #

pprPrec :: Rational -> ExpType -> SDoc #

Outputable EvCallStack # 
Instance details

Defined in TcEvidence

Outputable EvLit # 
Instance details

Defined in TcEvidence

Methods

ppr :: EvLit -> SDoc #

pprPrec :: Rational -> EvLit -> SDoc #

Outputable EvTypeable # 
Instance details

Defined in TcEvidence

Outputable EvTerm # 
Instance details

Defined in TcEvidence

Methods

ppr :: EvTerm -> SDoc #

pprPrec :: Rational -> EvTerm -> SDoc #

Outputable EvBind # 
Instance details

Defined in TcEvidence

Methods

ppr :: EvBind -> SDoc #

pprPrec :: Rational -> EvBind -> SDoc #

Outputable EvBindMap # 
Instance details

Defined in TcEvidence

Outputable EvBindsVar # 
Instance details

Defined in TcEvidence

Outputable TcEvBinds # 
Instance details

Defined in TcEvidence

Outputable HsWrapper # 
Instance details

Defined in TcEvidence

Outputable HsTyLit # 
Instance details

Defined in HsTypes

Methods

ppr :: HsTyLit -> SDoc #

pprPrec :: Rational -> HsTyLit -> SDoc #

Outputable HsIPName # 
Instance details

Defined in HsTypes

Outputable OverLitVal # 
Instance details

Defined in HsLit

Outputable TcSpecPrag # 
Instance details

Defined in HsBinds

Outputable CgLoc # 
Instance details

Defined in StgCmmClosure

Methods

ppr :: CgLoc -> SDoc #

pprPrec :: Rational -> CgLoc -> SDoc #

Outputable Sequel # 
Instance details

Defined in StgCmmMonad

Methods

ppr :: Sequel -> SDoc #

pprPrec :: Rational -> Sequel -> SDoc #

Outputable CgIdInfo # 
Instance details

Defined in StgCmmMonad

Outputable ArgRep # 
Instance details

Defined in StgCmmArgRep

Methods

ppr :: ArgRep -> SDoc #

pprPrec :: Rational -> ArgRep -> SDoc #

Outputable ClsInst # 
Instance details

Defined in InstEnv

Methods

ppr :: ClsInst -> SDoc #

pprPrec :: Rational -> ClsInst -> SDoc #

Outputable DocDecl # 
Instance details

Defined in HsDecls

Methods

ppr :: DocDecl -> SDoc #

pprPrec :: Rational -> DocDecl -> SDoc #

Outputable ForeignExport # 
Instance details

Defined in HsDecls

Outputable ForeignImport # 
Instance details

Defined in HsDecls

Outputable NewOrData # 
Instance details

Defined in HsDecls

Outputable PendingTcSplice # 
Instance details

Defined in HsExpr

Outputable PendingRnSplice # 
Instance details

Defined in HsExpr

Outputable SpliceDecoration # 
Instance details

Defined in HsExpr

Outputable UnboundVar # 
Instance details

Defined in HsExpr

Outputable PmLit # 
Instance details

Defined in PmExpr

Methods

ppr :: PmLit -> SDoc #

pprPrec :: Rational -> PmLit -> SDoc #

Outputable PmExpr # 
Instance details

Defined in PmExpr

Methods

ppr :: PmExpr -> SDoc #

pprPrec :: Rational -> PmExpr -> SDoc #

Outputable CompleteMatch # 
Instance details

Defined in HscTypes

Outputable Unlinked # 
Instance details

Defined in HscTypes

Outputable Linkable # 
Instance details

Defined in HscTypes

Outputable IfaceTrustInfo # 
Instance details

Defined in HscTypes

Outputable IfaceVectInfo # 
Instance details

Defined in HscTypes

Outputable VectInfo # 
Instance details

Defined in HscTypes

Outputable ModSummary # 
Instance details

Defined in HscTypes

Outputable FixItem # 
Instance details

Defined in HscTypes

Methods

ppr :: FixItem -> SDoc #

pprPrec :: Rational -> FixItem -> SDoc #

Outputable Warnings # 
Instance details

Defined in LoadIface

Outputable InteractiveImport # 
Instance details

Defined in HscTypes

Outputable SptEntry # 
Instance details

Defined in HscTypes

Outputable TargetId # 
Instance details

Defined in HscTypes

Outputable Target # 
Instance details

Defined in HscTypes

Methods

ppr :: Target -> SDoc #

pprPrec :: Rational -> Target -> SDoc #

Outputable TypeOrKind # 
Instance details

Defined in TcRnTypes

Outputable CtOrigin # 
Instance details

Defined in TcRnTypes

Outputable SkolemInfo # 
Instance details

Defined in TcRnTypes

Outputable SubGoalDepth # 
Instance details

Defined in TcRnTypes

Outputable CtFlavour # 
Instance details

Defined in TcRnTypes

Outputable CtEvidence # 
Instance details

Defined in TcRnTypes

Outputable TcEvDest # 
Instance details

Defined in TcRnTypes

Outputable ImplicStatus # 
Instance details

Defined in TcRnTypes

Outputable Implication # 
Instance details

Defined in TcRnTypes

Outputable WantedConstraints # 
Instance details

Defined in TcRnTypes

Outputable Hole # 
Instance details

Defined in TcRnTypes

Methods

ppr :: Hole -> SDoc #

pprPrec :: Rational -> Hole -> SDoc #

Outputable Ct # 
Instance details

Defined in TcRnTypes

Methods

ppr :: Ct -> SDoc #

pprPrec :: Rational -> Ct -> SDoc #

Outputable TcPatSynInfo # 
Instance details

Defined in TcRnTypes

Outputable TcIdSigInst # 
Instance details

Defined in TcRnTypes

Outputable TcIdSigInfo # 
Instance details

Defined in TcRnTypes

Outputable TcSigInfo # 
Instance details

Defined in TcRnTypes

Outputable WhereFrom # 
Instance details

Defined in TcRnTypes

Outputable IdBindingInfo # 
Instance details

Defined in TcRnTypes

Outputable PromotionErr # 
Instance details

Defined in TcRnTypes

Outputable TcTyThing # 
Instance details

Defined in TcRnTypes

Outputable ThStage # 
Instance details

Defined in TcRnTypes

Methods

ppr :: ThStage -> SDoc #

pprPrec :: Rational -> ThStage -> SDoc #

Outputable TcBinder # 
Instance details

Defined in TcRnTypes

Outputable PhasePlus # 
Instance details

Defined in PipelineMonad

Outputable HsComponentId # 
Instance details

Defined in BkpSyn

Outputable FloatBind # 
Instance details

Defined in MkCore

Outputable Subst # 
Instance details

Defined in CoreSubst

Methods

ppr :: Subst -> SDoc #

pprPrec :: Rational -> Subst -> SDoc #

Outputable CallCtxt # 
Instance details

Defined in CoreUnfold

Outputable ArgSummary # 
Instance details

Defined in CoreUnfold

Outputable Tick # 
Instance details

Defined in CoreMonad

Methods

ppr :: Tick -> SDoc #

pprPrec :: Rational -> Tick -> SDoc #

Outputable FloatOutSwitches # 
Instance details

Defined in CoreMonad

Outputable SimplMode # 
Instance details

Defined in CoreMonad

Outputable CoreToDo # 
Instance details

Defined in CoreMonad

Outputable LetFloats # 
Instance details

Defined in SimplEnv

Outputable SimplSR # 
Instance details

Defined in SimplEnv

Methods

ppr :: SimplSR -> SDoc #

pprPrec :: Rational -> SimplSR -> SDoc #

Outputable SimplFloats # 
Instance details

Defined in SimplEnv

Outputable ArgSpec # 
Instance details

Defined in SimplUtils

Methods

ppr :: ArgSpec -> SDoc #

pprPrec :: Rational -> ArgSpec -> SDoc #

Outputable DupFlag # 
Instance details

Defined in SimplUtils

Methods

ppr :: DupFlag -> SDoc #

pprPrec :: Rational -> DupFlag -> SDoc #

Outputable SimplCont # 
Instance details

Defined in SimplUtils

Outputable FloatSpec # 
Instance details

Defined in SetLevels

Outputable Level # 
Instance details

Defined in SetLevels

Methods

ppr :: Level -> SDoc #

pprPrec :: Rational -> Level -> SDoc #

Outputable HsSigCtxt # 
Instance details

Defined in RnEnv

Outputable ChildLookupResult # 
Instance details

Defined in RnEnv

Outputable ClosureType # 
Instance details

Defined in RtClosureInspect

Outputable Term # 
Instance details

Defined in RtClosureInspect

Methods

ppr :: Term -> SDoc #

pprPrec :: Rational -> Term -> SDoc #

Outputable InertCans # 
Instance details

Defined in TcSMonad

Outputable InertSet # 
Instance details

Defined in TcSMonad

Outputable WorkList # 
Instance details

Defined in TcSMonad

Outputable FlattenMode # 
Instance details

Defined in TcFlatten

Outputable InferMode # 
Instance details

Defined in TcSimplify

Outputable ThetaOrigin # 
Instance details

Defined in TcDerivUtils

Outputable PredOrigin # 
Instance details

Defined in TcDerivUtils

Outputable DerivSpecMechanism # 
Instance details

Defined in TcDerivUtils

Outputable DerivEnv # 
Instance details

Defined in TcDerivUtils

Outputable BCInstr # 
Instance details

Defined in ByteCodeInstr

Methods

ppr :: BCInstr -> SDoc #

pprPrec :: Rational -> BCInstr -> SDoc #

Outputable LetBndrSpec # 
Instance details

Defined in TcPat

Outputable EquationInfo # 
Instance details

Defined in DsMonad

Outputable DsMatchContext # 
Instance details

Defined in DsMonad

Outputable CompRepr # 
Instance details

Defined in Vectorise.Generic.Description

Outputable ProdRepr # 
Instance details

Defined in Vectorise.Generic.Description

Outputable ConRepr # 
Instance details

Defined in Vectorise.Generic.Description

Methods

ppr :: ConRepr -> SDoc #

pprPrec :: Rational -> ConRepr -> SDoc #

Outputable SumRepr # 
Instance details

Defined in Vectorise.Generic.Description

Methods

ppr :: SumRepr -> SDoc #

pprPrec :: Rational -> SumRepr -> SDoc #

Outputable Instr # 
Instance details

Defined in X86.Ppr

Methods

ppr :: Instr -> SDoc #

pprPrec :: Rational -> Instr -> SDoc #

Outputable Instr # 
Instance details

Defined in SPARC.Ppr

Methods

ppr :: Instr -> SDoc #

pprPrec :: Rational -> Instr -> SDoc #

Outputable Instr # 
Instance details

Defined in PPC.Ppr

Methods

ppr :: Instr -> SDoc #

pprPrec :: Rational -> Instr -> SDoc #

Outputable DwarfFrameBlock # 
Instance details

Defined in Dwarf.Types

Outputable CoreModule # 
Instance details

Defined in GHC

Outputable a => Outputable [a] # 
Instance details

Defined in Outputable

Methods

ppr :: [a] -> SDoc #

pprPrec :: Rational -> [a] -> SDoc #

Outputable a => Outputable (Maybe a) # 
Instance details

Defined in Outputable

Methods

ppr :: Maybe a -> SDoc #

pprPrec :: Rational -> Maybe a -> SDoc #

Outputable elt => Outputable (IntMap elt) # 
Instance details

Defined in Outputable

Methods

ppr :: IntMap elt -> SDoc #

pprPrec :: Rational -> IntMap elt -> SDoc #

Outputable a => Outputable (SCC a) # 
Instance details

Defined in Outputable

Methods

ppr :: SCC a -> SDoc #

pprPrec :: Rational -> SCC a -> SDoc #

Outputable a => Outputable (Set a) # 
Instance details

Defined in Outputable

Methods

ppr :: Set a -> SDoc #

pprPrec :: Rational -> Set a -> SDoc #

Outputable a => Outputable (Pair a) # 
Instance details

Defined in Pair

Methods

ppr :: Pair a -> SDoc #

pprPrec :: Rational -> Pair a -> SDoc #

Outputable a => Outputable (OrdList a) # 
Instance details

Defined in OrdList

Methods

ppr :: OrdList a -> SDoc #

pprPrec :: Rational -> OrdList a -> SDoc #

Outputable (DefMethSpec ty) # 
Instance details

Defined in BasicTypes

Methods

ppr :: DefMethSpec ty -> SDoc #

pprPrec :: Rational -> DefMethSpec ty -> SDoc #

Outputable a => Outputable (UniqFM a) # 
Instance details

Defined in UniqFM

Methods

ppr :: UniqFM a -> SDoc #

pprPrec :: Rational -> UniqFM a -> SDoc #

Outputable a => Outputable (UniqSet a) # 
Instance details

Defined in UniqSet

Methods

ppr :: UniqSet a -> SDoc #

pprPrec :: Rational -> UniqSet a -> SDoc #

Outputable a => Outputable (UniqDFM a) # 
Instance details

Defined in UniqDFM

Methods

ppr :: UniqDFM a -> SDoc #

pprPrec :: Rational -> UniqDFM a -> SDoc #

Outputable a => Outputable (LabelMap a) # 
Instance details

Defined in Hoopl.Label

Methods

ppr :: LabelMap a -> SDoc #

pprPrec :: Rational -> LabelMap a -> SDoc #

OutputableBndr a => Outputable (BooleanFormula a) # 
Instance details

Defined in BooleanFormula

Outputable node => Outputable (Graph node) # 
Instance details

Defined in Digraph

Methods

ppr :: Graph node -> SDoc #

pprPrec :: Rational -> Graph node -> SDoc #

Outputable a => Outputable (Bag a) # 
Instance details

Defined in Bag

Methods

ppr :: Bag a -> SDoc #

pprPrec :: Rational -> Bag a -> SDoc #

Outputable a => Outputable (OccEnv a) # 
Instance details

Defined in OccName

Methods

ppr :: OccEnv a -> SDoc #

pprPrec :: Rational -> OccEnv a -> SDoc #

Outputable a => Outputable (FieldLbl a) # 
Instance details

Defined in FieldLabel

Methods

ppr :: FieldLbl a -> SDoc #

pprPrec :: Rational -> FieldLbl a -> SDoc #

Outputable name => Outputable (AnnTarget name) # 
Instance details

Defined in Annotations

Methods

ppr :: AnnTarget name -> SDoc #

pprPrec :: Rational -> AnnTarget name -> SDoc #

Outputable (CoAxiom br) # 
Instance details

Defined in CoAxiom

Methods

ppr :: CoAxiom br -> SDoc #

pprPrec :: Rational -> CoAxiom br -> SDoc #

Outputable a => Outputable (UnifyResultM a) # 
Instance details

Defined in Unify

Outputable b => Outputable (TaggedBndr b) # 
Instance details

Defined in CoreSyn

Methods

ppr :: TaggedBndr b -> SDoc #

pprPrec :: Rational -> TaggedBndr b -> SDoc #

Outputable id => Outputable (Tickish id) # 
Instance details

Defined in PprCore

Methods

ppr :: Tickish id -> SDoc #

pprPrec :: Rational -> Tickish id -> SDoc #

OutputableBndr b => Outputable (Bind b) # 
Instance details

Defined in PprCore

Methods

ppr :: Bind b -> SDoc #

pprPrec :: Rational -> Bind b -> SDoc #

OutputableBndr b => Outputable (Expr b) # 
Instance details

Defined in PprCore

Methods

ppr :: Expr b -> SDoc #

pprPrec :: Rational -> Expr b -> SDoc #

Outputable a => Outputable (CoreMap a) # 
Instance details

Defined in TrieMap

Methods

ppr :: CoreMap a -> SDoc #

pprPrec :: Rational -> CoreMap a -> SDoc #

Outputable bdee => Outputable (GenStgArg bdee) # 
Instance details

Defined in StgSyn

Methods

ppr :: GenStgArg bdee -> SDoc #

pprPrec :: Rational -> GenStgArg bdee -> SDoc #

Outputable instr => Outputable (ListGraph instr) # 
Instance details

Defined in Cmm

Methods

ppr :: ListGraph instr -> SDoc #

pprPrec :: Rational -> ListGraph instr -> SDoc #

Outputable instr => Outputable (GenBasicBlock instr) # 
Instance details

Defined in Cmm

Methods

ppr :: GenBasicBlock instr -> SDoc #

pprPrec :: Rational -> GenBasicBlock instr -> SDoc #

Outputable instr => Outputable (LiveInstr instr) # 
Instance details

Defined in RegAlloc.Liveness

Methods

ppr :: LiveInstr instr -> SDoc #

pprPrec :: Rational -> LiveInstr instr -> SDoc #

Outputable instr => Outputable (InstrSR instr) # 
Instance details

Defined in RegAlloc.Liveness

Methods

ppr :: InstrSR instr -> SDoc #

pprPrec :: Rational -> InstrSR instr -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (Pat pass) # 
Instance details

Defined in HsPat

Methods

ppr :: Pat pass -> SDoc #

pprPrec :: Rational -> Pat pass -> SDoc #

OutputableBndrId pass => Outputable (IE pass) # 
Instance details

Defined in HsImpExp

Methods

ppr :: IE pass -> SDoc #

pprPrec :: Rational -> IE pass -> SDoc #

OutputableBndr name => Outputable (IEWrappedName name) # 
Instance details

Defined in HsImpExp

Methods

ppr :: IEWrappedName name -> SDoc #

pprPrec :: Rational -> IEWrappedName name -> SDoc #

OutputableBndrId pass => Outputable (ImportDecl pass) # 
Instance details

Defined in HsImpExp

Methods

ppr :: ImportDecl pass -> SDoc #

pprPrec :: Rational -> ImportDecl pass -> SDoc #

(SourceTextX p, OutputableBndrId p) => Outputable (SyntaxExpr p) # 
Instance details

Defined in HsExpr

Methods

ppr :: SyntaxExpr p -> SDoc #

pprPrec :: Rational -> SyntaxExpr p -> SDoc #

(SourceTextX p, OutputableBndrId p) => Outputable (HsSplice p) # 
Instance details

Defined in HsExpr

Methods

ppr :: HsSplice p -> SDoc #

pprPrec :: Rational -> HsSplice p -> SDoc #

(SourceTextX p, OutputableBndrId p) => Outputable (HsCmd p) # 
Instance details

Defined in HsExpr

Methods

ppr :: HsCmd p -> SDoc #

pprPrec :: Rational -> HsCmd p -> SDoc #

(SourceTextX p, OutputableBndrId p) => Outputable (HsExpr p) # 
Instance details

Defined in HsExpr

Methods

ppr :: HsExpr p -> SDoc #

pprPrec :: Rational -> HsExpr p -> SDoc #

Outputable (AmbiguousFieldOcc pass) # 
Instance details

Defined in HsTypes

Outputable (FieldOcc pass) # 
Instance details

Defined in HsTypes

Methods

ppr :: FieldOcc pass -> SDoc #

pprPrec :: Rational -> FieldOcc pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (ConDeclField pass) # 
Instance details

Defined in HsTypes

Methods

ppr :: ConDeclField pass -> SDoc #

pprPrec :: Rational -> ConDeclField pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (HsAppType pass) # 
Instance details

Defined in HsTypes

Methods

ppr :: HsAppType pass -> SDoc #

pprPrec :: Rational -> HsAppType pass -> SDoc #

Outputable (HsWildCardInfo pass) # 
Instance details

Defined in HsTypes

Methods

ppr :: HsWildCardInfo pass -> SDoc #

pprPrec :: Rational -> HsWildCardInfo pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (HsType pass) # 
Instance details

Defined in HsTypes

Methods

ppr :: HsType pass -> SDoc #

pprPrec :: Rational -> HsType pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (HsTyVarBndr pass) # 
Instance details

Defined in HsTypes

Methods

ppr :: HsTyVarBndr pass -> SDoc #

pprPrec :: Rational -> HsTyVarBndr pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (LHsQTyVars pass) # 
Instance details

Defined in HsTypes

Methods

ppr :: LHsQTyVars pass -> SDoc #

pprPrec :: Rational -> LHsQTyVars pass -> SDoc #

(SourceTextX p, OutputableBndrId p) => Outputable (HsOverLit p) # 
Instance details

Defined in HsLit

Methods

ppr :: HsOverLit p -> SDoc #

pprPrec :: Rational -> HsOverLit p -> SDoc #

SourceTextX x => Outputable (HsLit x) # 
Instance details

Defined in HsLit

Methods

ppr :: HsLit x -> SDoc #

pprPrec :: Rational -> HsLit x -> SDoc #

Outputable a => Outputable (RecordPatSynField a) # 
Instance details

Defined in HsBinds

OutputableBndrId pass => Outputable (FixitySig pass) # 
Instance details

Defined in HsBinds

Methods

ppr :: FixitySig pass -> SDoc #

pprPrec :: Rational -> FixitySig pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (Sig pass) # 
Instance details

Defined in HsBinds

Methods

ppr :: Sig pass -> SDoc #

pprPrec :: Rational -> Sig pass -> SDoc #

(SourceTextX p, OutputableBndrId p) => Outputable (IPBind p) # 
Instance details

Defined in HsBinds

Methods

ppr :: IPBind p -> SDoc #

pprPrec :: Rational -> IPBind p -> SDoc #

(SourceTextX p, OutputableBndrId p) => Outputable (HsIPBinds p) # 
Instance details

Defined in HsBinds

Methods

ppr :: HsIPBinds p -> SDoc #

pprPrec :: Rational -> HsIPBinds p -> SDoc #

OutputableBndrId p => Outputable (ABExport p) # 
Instance details

Defined in HsBinds

Methods

ppr :: ABExport p -> SDoc #

pprPrec :: Rational -> ABExport p -> SDoc #

Outputable a => Outputable (NonVoid a) # 
Instance details

Defined in StgCmmClosure

Methods

ppr :: NonVoid a -> SDoc #

pprPrec :: Rational -> NonVoid a -> SDoc #

OutputableBndr (IdP pass) => Outputable (RoleAnnotDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: RoleAnnotDecl pass -> SDoc #

pprPrec :: Rational -> RoleAnnotDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (AnnDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: AnnDecl pass -> SDoc #

pprPrec :: Rational -> AnnDecl pass -> SDoc #

OutputableBndr (IdP pass) => Outputable (WarnDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: WarnDecl pass -> SDoc #

pprPrec :: Rational -> WarnDecl pass -> SDoc #

OutputableBndr (IdP pass) => Outputable (WarnDecls pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: WarnDecls pass -> SDoc #

pprPrec :: Rational -> WarnDecls pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (VectDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: VectDecl pass -> SDoc #

pprPrec :: Rational -> VectDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (RuleBndr pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: RuleBndr pass -> SDoc #

pprPrec :: Rational -> RuleBndr pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (RuleDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: RuleDecl pass -> SDoc #

pprPrec :: Rational -> RuleDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (RuleDecls pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: RuleDecls pass -> SDoc #

pprPrec :: Rational -> RuleDecls pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (ForeignDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: ForeignDecl pass -> SDoc #

pprPrec :: Rational -> ForeignDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (DefaultDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: DefaultDecl pass -> SDoc #

pprPrec :: Rational -> DefaultDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (DerivDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: DerivDecl pass -> SDoc #

pprPrec :: Rational -> DerivDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (InstDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: InstDecl pass -> SDoc #

pprPrec :: Rational -> InstDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (ClsInstDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: ClsInstDecl pass -> SDoc #

pprPrec :: Rational -> ClsInstDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (DataFamInstDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: DataFamInstDecl pass -> SDoc #

pprPrec :: Rational -> DataFamInstDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (TyFamInstDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: TyFamInstDecl pass -> SDoc #

pprPrec :: Rational -> TyFamInstDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (ConDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: ConDecl pass -> SDoc #

pprPrec :: Rational -> ConDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (HsDerivingClause pass) # 
Instance details

Defined in HsDecls

(SourceTextX pass, OutputableBndrId pass) => Outputable (HsDataDefn pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: HsDataDefn pass -> SDoc #

pprPrec :: Rational -> HsDataDefn pass -> SDoc #

Outputable (FamilyInfo pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: FamilyInfo pass -> SDoc #

pprPrec :: Rational -> FamilyInfo pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (FamilyDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: FamilyDecl pass -> SDoc #

pprPrec :: Rational -> FamilyDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (TyClGroup pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: TyClGroup pass -> SDoc #

pprPrec :: Rational -> TyClGroup pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (TyClDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: TyClDecl pass -> SDoc #

pprPrec :: Rational -> TyClDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (SpliceDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: SpliceDecl pass -> SDoc #

pprPrec :: Rational -> SpliceDecl pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (HsGroup pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: HsGroup pass -> SDoc #

pprPrec :: Rational -> HsGroup pass -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (HsDecl pass) # 
Instance details

Defined in HsDecls

Methods

ppr :: HsDecl pass -> SDoc #

pprPrec :: Rational -> HsDecl pass -> SDoc #

(Outputable p, Outputable (NameOrRdrName p)) => Outputable (HsStmtContext p) # 
Instance details

Defined in HsExpr

OutputableBndr id => Outputable (HsMatchContext id) # 
Instance details

Defined in HsExpr

(SourceTextX p, OutputableBndrId p) => Outputable (ArithSeqInfo p) # 
Instance details

Defined in HsExpr

(SourceTextX p, OutputableBndrId p) => Outputable (HsBracket p) # 
Instance details

Defined in HsExpr

Methods

ppr :: HsBracket p -> SDoc #

pprPrec :: Rational -> HsBracket p -> SDoc #

(SourceTextX p, OutputableBndrId p) => Outputable (HsSplicedThing p) # 
Instance details

Defined in HsExpr

(SourceTextX p, OutputableBndrId p) => Outputable (HsCmdTop p) # 
Instance details

Defined in HsExpr

Methods

ppr :: HsCmdTop p -> SDoc #

pprPrec :: Rational -> HsCmdTop p -> SDoc #

(SourceTextX pass, OutputableBndrId pass) => Outputable (HsModule pass) # 
Instance details

Defined in HsSyn

Methods

ppr :: HsModule pass -> SDoc #

pprPrec :: Rational -> HsModule pass -> SDoc #

(SourceTextX a, OutputableBndrId a) => Outputable (InstInfo a) # 
Instance details

Defined in TcEnv

Methods

ppr :: InstInfo a -> SDoc #

pprPrec :: Rational -> InstInfo a -> SDoc #

Outputable (FunDepEqn a) # 
Instance details

Defined in FunDeps

Methods

ppr :: FunDepEqn a -> SDoc #

pprPrec :: Rational -> FunDepEqn a -> SDoc #

Outputable a => Outputable (StopOrContinue a) # 
Instance details

Defined in TcCanonical

Outputable theta => Outputable (DerivSpec theta) # 
Instance details

Defined in TcDerivUtils

Methods

ppr :: DerivSpec theta -> SDoc #

pprPrec :: Rational -> DerivSpec theta -> SDoc #

Outputable a => Outputable (ProtoBCO a) # 
Instance details

Defined in ByteCodeInstr

Methods

ppr :: ProtoBCO a -> SDoc #

pprPrec :: Rational -> ProtoBCO a -> SDoc #

(Outputable a, Outputable b) => Outputable (Either a b) # 
Instance details

Defined in Outputable

Methods

ppr :: Either a b -> SDoc #

pprPrec :: Rational -> Either a b -> SDoc #

(Outputable a, Outputable b) => Outputable (a, b) # 
Instance details

Defined in Outputable

Methods

ppr :: (a, b) -> SDoc #

pprPrec :: Rational -> (a, b) -> SDoc #

(Outputable key, Outputable elt) => Outputable (Map key elt) # 
Instance details

Defined in Outputable

Methods

ppr :: Map key elt -> SDoc #

pprPrec :: Rational -> Map key elt -> SDoc #

(Outputable l, Outputable e) => Outputable (GenLocated l e) # 
Instance details

Defined in SrcLoc

Methods

ppr :: GenLocated l e -> SDoc #

pprPrec :: Rational -> GenLocated l e -> SDoc #

(Outputable k, Outputable a) => Outputable (UniqMap k a) # 
Instance details

Defined in UniqMap

Methods

ppr :: UniqMap k a -> SDoc #

pprPrec :: Rational -> UniqMap k a -> SDoc #

(Outputable a, Outputable b) => Outputable (Node a b) # 
Instance details

Defined in Digraph

Methods

ppr :: Node a b -> SDoc #

pprPrec :: Rational -> Node a b -> SDoc #

Outputable tv => Outputable (TyVarBndr tv ArgFlag) # 
Instance details

Defined in Var

Outputable tv => Outputable (TyVarBndr tv TyConBndrVis) # 
Instance details

Defined in TyCon

(TrieMap m, Outputable a) => Outputable (ListMap m a) # 
Instance details

Defined in TrieMap

Methods

ppr :: ListMap m a -> SDoc #

pprPrec :: Rational -> ListMap m a -> SDoc #

(OutputableBndr bndr, Outputable bdee, Ord bdee) => Outputable (GenStgRhs bndr bdee) # 
Instance details

Defined in StgSyn

Methods

ppr :: GenStgRhs bndr bdee -> SDoc #

pprPrec :: Rational -> GenStgRhs bndr bdee -> SDoc #

(OutputableBndr bndr, Outputable bdee, Ord bdee) => Outputable (GenStgExpr bndr bdee) # 
Instance details

Defined in StgSyn

Methods

ppr :: GenStgExpr bndr bdee -> SDoc #

pprPrec :: Rational -> GenStgExpr bndr bdee -> SDoc #

(OutputableBndr bndr, Outputable bdee, Ord bdee) => Outputable (GenStgBinding bndr bdee) # 
Instance details

Defined in StgSyn

Methods

ppr :: GenStgBinding bndr bdee -> SDoc #

pprPrec :: Rational -> GenStgBinding bndr bdee -> SDoc #

(OutputableBndr bndr, Outputable bdee, Ord bdee) => Outputable (GenStgTopBinding bndr bdee) # 
Instance details

Defined in StgSyn

Methods

ppr :: GenStgTopBinding bndr bdee -> SDoc #

pprPrec :: Rational -> GenStgTopBinding bndr bdee -> SDoc #

Outputable (CmmNode e x) # 
Instance details

Defined in PprCmm

Methods

ppr :: CmmNode e x -> SDoc #

pprPrec :: Rational -> CmmNode e x -> SDoc #

(Outputable arg, Outputable rec) => Outputable (HsConDetails arg rec) # 
Instance details

Defined in HsTypes

Methods

ppr :: HsConDetails arg rec -> SDoc #

pprPrec :: Rational -> HsConDetails arg rec -> SDoc #

Outputable thing => Outputable (HsWildCardBndrs pass thing) # 
Instance details

Defined in HsTypes

Methods

ppr :: HsWildCardBndrs pass thing -> SDoc #

pprPrec :: Rational -> HsWildCardBndrs pass thing -> SDoc #

Outputable thing => Outputable (HsImplicitBndrs pass thing) # 
Instance details

Defined in HsTypes

Methods

ppr :: HsImplicitBndrs pass thing -> SDoc #

pprPrec :: Rational -> HsImplicitBndrs pass thing -> SDoc #

(SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR) => Outputable (PatSynBind idL idR) # 
Instance details

Defined in HsBinds

Methods

ppr :: PatSynBind idL idR -> SDoc #

pprPrec :: Rational -> PatSynBind idL idR -> SDoc #

(SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR) => Outputable (HsBindLR idL idR) # 
Instance details

Defined in HsBinds

Methods

ppr :: HsBindLR idL idR -> SDoc #

pprPrec :: Rational -> HsBindLR idL idR -> SDoc #

(SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR) => Outputable (HsValBindsLR idL idR) # 
Instance details

Defined in HsBinds

Methods

ppr :: HsValBindsLR idL idR -> SDoc #

pprPrec :: Rational -> HsValBindsLR idL idR -> SDoc #

(SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR) => Outputable (HsLocalBindsLR idL idR) # 
Instance details

Defined in HsBinds

Methods

ppr :: HsLocalBindsLR idL idR -> SDoc #

pprPrec :: Rational -> HsLocalBindsLR idL idR -> SDoc #

(Outputable p, Outputable arg) => Outputable (HsRecField' p arg) # 
Instance details

Defined in HsPat

Methods

ppr :: HsRecField' p arg -> SDoc #

pprPrec :: Rational -> HsRecField' p arg -> SDoc #

Outputable arg => Outputable (HsRecFields p arg) # 
Instance details

Defined in HsPat

Methods

ppr :: HsRecFields p arg -> SDoc #

pprPrec :: Rational -> HsRecFields p arg -> SDoc #

(SourceTextX idL, OutputableBndrId idL) => Outputable (ParStmtBlock idL idR) # 
Instance details

Defined in HsExpr

Methods

ppr :: ParStmtBlock idL idR -> SDoc #

pprPrec :: Rational -> ParStmtBlock idL idR -> SDoc #

(SourceTextX idR, OutputableBndrId idR, Outputable body) => Outputable (Match idR body) # 
Instance details

Defined in HsExpr

Methods

ppr :: Match idR body -> SDoc #

pprPrec :: Rational -> Match idR body -> SDoc #

(Outputable statics, Outputable instr) => Outputable (RegAllocStats statics instr) # 
Instance details

Defined in RegAlloc.Graph.Stats

Methods

ppr :: RegAllocStats statics instr -> SDoc #

pprPrec :: Rational -> RegAllocStats statics instr -> SDoc #

(Outputable a, Outputable b, Outputable c) => Outputable (a, b, c) # 
Instance details

Defined in Outputable

Methods

ppr :: (a, b, c) -> SDoc #

pprPrec :: Rational -> (a, b, c) -> SDoc #

Outputable (Block CmmNode C C) # 
Instance details

Defined in PprCmm

Outputable (Block CmmNode C O) # 
Instance details

Defined in PprCmm

Outputable (Block CmmNode O C) # 
Instance details

Defined in PprCmm

Outputable (Block CmmNode O O) # 
Instance details

Defined in PprCmm

Outputable (Graph CmmNode e x) # 
Instance details

Defined in PprCmm

Methods

ppr :: Graph CmmNode e x -> SDoc #

pprPrec :: Rational -> Graph CmmNode e x -> SDoc #

(Outputable d, Outputable info, Outputable i) => Outputable (GenCmmDecl d info i) # 
Instance details

Defined in PprCmmDecl

Methods

ppr :: GenCmmDecl d info i -> SDoc #

pprPrec :: Rational -> GenCmmDecl d info i -> SDoc #

(SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR, Outputable body) => Outputable (StmtLR idL idR body) # 
Instance details

Defined in HsExpr

Methods

ppr :: StmtLR idL idR body -> SDoc #

pprPrec :: Rational -> StmtLR idL idR body -> SDoc #

(Outputable a, Outputable b, Outputable c, Outputable d) => Outputable (a, b, c, d) # 
Instance details

Defined in Outputable

Methods

ppr :: (a, b, c, d) -> SDoc #

pprPrec :: Rational -> (a, b, c, d) -> SDoc #

(Outputable a, Outputable b, Outputable c, Outputable d, Outputable e) => Outputable (a, b, c, d, e) # 
Instance details

Defined in Outputable

Methods

ppr :: (a, b, c, d, e) -> SDoc #

pprPrec :: Rational -> (a, b, c, d, e) -> SDoc #

(Outputable a, Outputable b, Outputable c, Outputable d, Outputable e, Outputable f) => Outputable (a, b, c, d, e, f) # 
Instance details

Defined in Outputable

Methods

ppr :: (a, b, c, d, e, f) -> SDoc #

pprPrec :: Rational -> (a, b, c, d, e, f) -> SDoc #

(Outputable a, Outputable b, Outputable c, Outputable d, Outputable e, Outputable f, Outputable g) => Outputable (a, b, c, d, e, f, g) # 
Instance details

Defined in Outputable

Methods

ppr :: (a, b, c, d, e, f, g) -> SDoc #

pprPrec :: Rational -> (a, b, c, d, e, f, g) -> SDoc #

class Outputable a => OutputableBndr a where #

When we print a binder, we often want to print its type too. The OutputableBndr class encapsulates this idea.

Minimal complete definition

pprPrefixOcc, pprInfixOcc

Instances
OutputableBndr Name # 
Instance details

Defined in Name

OutputableBndr OccName # 
Instance details

Defined in OccName

OutputableBndr RdrName # 
Instance details

Defined in RdrName

OutputableBndr Var # 
Instance details

Defined in PprCore

OutputableBndr PatSyn # 
Instance details

Defined in PatSyn

OutputableBndr DataCon # 
Instance details

Defined in DataCon

OutputableBndr ConLike # 
Instance details

Defined in ConLike

OutputableBndr HsIPName # 
Instance details

Defined in HsTypes

Outputable b => OutputableBndr (TaggedBndr b) # 
Instance details

Defined in PprCore

OutputableBndr name => OutputableBndr (IEWrappedName name) # 
Instance details

Defined in HsImpExp

OutputableBndr (AmbiguousFieldOcc pass) # 
Instance details

Defined in HsTypes

Pretty printing combinators

data SDoc #

Represents a pretty-printable document.

To display an SDoc, use printSDoc, printSDocLn, bufLeftRenderSDoc, or renderWithStyle. Avoid calling runSDoc directly as it breaks the abstraction layer.

Instances
IsString SDoc # 
Instance details

Defined in Outputable

runSDoc :: SDoc -> SDocContext -> Doc #

initSDocContext :: DynFlags -> PprStyle -> SDocContext #

interppSP :: Outputable a => [a] -> SDoc #

Returns the separated concatenation of the pretty printed things.

interpp'SP :: Outputable a => [a] -> SDoc #

Returns the comma-separated concatenation of the pretty printed things.

pprQuotedList :: Outputable a => [a] -> SDoc #

Returns the comma-separated concatenation of the quoted pretty printed things.

[x,y,z]  ==>  `x', `y', `z'

pprWithCommas #

Arguments

:: (a -> SDoc)

The pretty printing function to use

-> [a]

The things to be pretty printed

-> SDoc

SDoc where the things have been pretty printed, comma-separated and finally packed into a paragraph.

pprWithBars #

Arguments

:: (a -> SDoc)

The pretty printing function to use

-> [a]

The things to be pretty printed

-> SDoc

SDoc where the things have been pretty printed, bar-separated and finally packed into a paragraph.

nest :: Int -> SDoc -> SDoc #

Indent SDoc some specified amount

char :: Char -> SDoc #

int :: Int -> SDoc #

doublePrec :: Int -> Double -> SDoc #

doublePrec p n shows a floating point number n with p digits of precision after the decimal point.

cparen :: Bool -> SDoc -> SDoc #

(<>) :: SDoc -> SDoc -> SDoc #

Join two SDoc together horizontally without a gap

(<+>) :: SDoc -> SDoc -> SDoc #

Join two SDoc together horizontally with a gap between them

hcat :: [SDoc] -> SDoc #

Concatenate SDoc horizontally

hsep :: [SDoc] -> SDoc #

Concatenate SDoc horizontally with a space between each one

($$) :: SDoc -> SDoc -> SDoc #

Join two SDoc together vertically; if there is no vertical overlap it "dovetails" the two onto one line

($+$) :: SDoc -> SDoc -> SDoc #

Join two SDoc together vertically

vcat :: [SDoc] -> SDoc #

Concatenate SDoc vertically with dovetailing

sep :: [SDoc] -> SDoc #

Separate: is either like hsep or like vcat, depending on what fits

cat :: [SDoc] -> SDoc #

Catenate: is either like hcat or like vcat, depending on what fits

fsep :: [SDoc] -> SDoc #

A paragraph-fill combinator. It's much like sep, only it keeps fitting things on one line until it can't fit any more.

fcat :: [SDoc] -> SDoc #

This behaves like fsep, but it uses <> for horizontal conposition rather than <+>

hang #

Arguments

:: SDoc

The header

-> Int

Amount to indent the hung body

-> SDoc

The hung body, indented and placed below the header

-> SDoc 

hangNotEmpty :: SDoc -> Int -> SDoc -> SDoc #

This behaves like hang, but does not indent the second document when the header is empty.

punctuate #

Arguments

:: SDoc

The punctuation

-> [SDoc]

The list that will have punctuation added between every adjacent pair of elements

-> [SDoc]

Punctuated list

ppWhen :: Bool -> SDoc -> SDoc #

speakNth :: Int -> SDoc #

Converts an integer to a verbal index:

speakNth 1 = text "first"
speakNth 5 = text "fifth"
speakNth 21 = text "21st"

speakN :: Int -> SDoc #

Converts an integer to a verbal multiplicity:

speakN 0 = text "none"
speakN 5 = text "five"
speakN 10 = text "10"

speakNOf :: Int -> SDoc -> SDoc #

Converts an integer and object description to a statement about the multiplicity of those objects:

speakNOf 0 (text "melon") = text "no melons"
speakNOf 1 (text "melon") = text "one melon"
speakNOf 3 (text "melon") = text "three melons"

plural :: [a] -> SDoc #

Determines the pluralisation suffix appropriate for the length of a list:

plural [] = char 's'
plural ["Hello"] = empty
plural ["Hello", "World"] = char 's'

isOrAre :: [a] -> SDoc #

Determines the form of to be appropriate for the length of a list:

isOrAre [] = text "are"
isOrAre ["Hello"] = text "is"
isOrAre ["Hello", "World"] = text "are"

doOrDoes :: [a] -> SDoc #

Determines the form of to do appropriate for the length of a list:

doOrDoes [] = text "do"
doOrDoes ["Hello"] = text "does"
doOrDoes ["Hello", "World"] = text "do"

coloured :: PprColour -> SDoc -> SDoc #

Apply the given colour/style for the argument.

Only takes effect if colours are enabled.

Converting SDoc into strings and outputing it

printSDoc :: Mode -> DynFlags -> Handle -> PprStyle -> SDoc -> IO () #

The analog of printDoc_ for SDoc, which tries to make sure the terminal doesn't get screwed up by the ANSI color codes if an exception is thrown during pretty-printing.

printSDocLn :: Mode -> DynFlags -> Handle -> PprStyle -> SDoc -> IO () #

Like printSDoc but appends an extra newline.

printForC :: DynFlags -> Handle -> SDoc -> IO () #

Like printSDocLn but specialized with LeftMode and PprCode CStyle. This is typically used to output C-- code.

bufLeftRenderSDoc :: DynFlags -> BufHandle -> PprStyle -> SDoc -> IO () #

An efficient variant of printSDoc specialized for LeftMode that outputs to a BufHandle.

pprHsChar :: Char -> SDoc #

Special combinator for showing character literals.

pprHsString :: FastString -> SDoc #

Special combinator for showing string literals.

pprHsBytes :: ByteString -> SDoc #

Special combinator for showing bytestring literals.

pprPrimChar :: Char -> SDoc #

Special combinator for showing unboxed literals.

Controlling the style in which output is printed

data BindingSite #

BindingSite is used to tell the thing that prints binder what language construct is binding the identifier. This can be used to decide how much info to print. Also see Note [Binding-site specific printing] in PprCore

Constructors

LambdaBind

The x in (x. e)

CaseBind

The x in case scrut of x { (y,z) -> ... }

CasePatBind

The y,z in case scrut of x { (y,z) -> ... }

LetBind

The x in (let x = rhs in e)

data PprStyle #

Instances
Outputable PprStyle # 
Instance details

Defined in Outputable

data CodeStyle #

Constructors

CStyle 
AsmStyle 

data PrintUnqualified #

When printing code that contains original names, we need to map the original names back to something the user understands. This is the purpose of the triple of functions that gets passed around when rendering SDoc.

type QueryQualifyName = Module -> OccName -> QualifyName #

given an original name, this function tells you which module name it should be qualified with when printing for the user, if any. For example, given Control.Exception.catch, which is in scope as Exception.catch, this function will return Just Exception. Note that the return value is a ModuleName, not a Module, because in source code, names are qualified by ModuleNames.

type QueryQualifyModule = Module -> Bool #

For a given module, we need to know whether to print it with a package name to disambiguate it.

type QueryQualifyPackage = UnitId -> Bool #

For a given package, we need to know whether to print it with the component id to disambiguate it.

alwaysQualifyNames :: QueryQualifyName #

NB: This won't ever show package IDs

withPprStyleDoc :: DynFlags -> PprStyle -> SDoc -> Doc #

This is not a recommended way to render SDoc, since it breaks the abstraction layer of SDoc. Prefer to use printSDoc, printSDocLn, bufLeftRenderSDoc, or renderWithStyle instead.

pprDeeperList :: ([SDoc] -> SDoc) -> [SDoc] -> SDoc #

Truncate a list that is longer than the current depth.

mkErrStyle :: DynFlags -> PrintUnqualified -> PprStyle #

Style for printing error messages

data Depth #

Constructors

AllTheWay 
PartWay Int 

ifPprDebug :: SDoc -> SDoc -> SDoc #

Says what to do with and without -dppr-debug

whenPprDebug :: SDoc -> SDoc #

Says what to do with -dppr-debug; without, return empty

Error handling and debugging utilities

pprPanic :: HasCallStack => String -> SDoc -> a #

Throw an exception saying "bug in GHC"

pprSorry :: String -> SDoc -> a #

Throw an exception saying "this isn't finished yet"

assertPprPanic :: HasCallStack => String -> Int -> SDoc -> a #

Panic with an assertation failure, recording the given file and line number. Should typically be accessed with the ASSERT family of macros

pprPgmError :: String -> SDoc -> a #

Throw an exception saying "bug in pgm being compiled" (used for unusual program errors)

pprTrace :: String -> SDoc -> a -> a #

If debug output is on, show some SDoc on the screen

pprTraceDebug :: String -> SDoc -> a -> a #

pprTraceIt :: Outputable a => String -> a -> a #

pprTraceIt desc x is equivalent to pprTrace desc (ppr x) x

warnPprTrace :: Bool -> String -> Int -> SDoc -> a -> a #

Just warn about an assertion failure, recording the given file and line number. Should typically be accessed with the WARN macros

pprSTrace :: HasCallStack => SDoc -> a -> a #

If debug output is on, show some SDoc on the screen along with a call stack when available.

pprTraceException :: ExceptionMonad m => String -> SDoc -> m a -> m a #

pprTraceException desc x action runs action, printing a message if it throws an exception.

trace :: String -> a -> a Source #

The trace function outputs the trace message given as its first argument, before returning the second argument as its result.

For example, this returns the value of f x but first outputs the message.

>>> let x = 123; f = show
>>> trace ("calling f with x = " ++ show x) (f x)
"calling f with x = 123
123"

The trace function should only be used for debugging, or for monitoring execution. The function is not referentially transparent: its type indicates that it is a pure function but it has the side effect of outputting the trace message.

pgmError :: String -> a #

Panics and asserts.

panic :: String -> a #

Panics and asserts.

sorry :: String -> a #

Panics and asserts.

assertPanic :: String -> Int -> a #

Throw a failed assertion exception for a given filename and line number.

pprDebugAndThen :: DynFlags -> (String -> a) -> SDoc -> SDoc -> a #