ghc-8.4.1: 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

Methods

ppr :: Bool -> SDoc #

pprPrec :: Rational -> Bool -> SDoc #

Outputable Char # 
Instance details

Methods

ppr :: Char -> SDoc #

pprPrec :: Rational -> Char -> SDoc #

Outputable Int # 
Instance details

Methods

ppr :: Int -> SDoc #

pprPrec :: Rational -> Int -> SDoc #

Outputable Int32 # 
Instance details

Methods

ppr :: Int32 -> SDoc #

pprPrec :: Rational -> Int32 -> SDoc #

Outputable Int64 # 
Instance details

Methods

ppr :: Int64 -> SDoc #

pprPrec :: Rational -> Int64 -> SDoc #

Outputable Integer # 
Instance details

Methods

ppr :: Integer -> SDoc #

pprPrec :: Rational -> Integer -> SDoc #

Outputable Ordering # 
Instance details
Outputable Word # 
Instance details

Methods

ppr :: Word -> SDoc #

pprPrec :: Rational -> Word -> SDoc #

Outputable Word16 # 
Instance details

Methods

ppr :: Word16 -> SDoc #

pprPrec :: Rational -> Word16 -> SDoc #

Outputable Word32 # 
Instance details

Methods

ppr :: Word32 -> SDoc #

pprPrec :: Rational -> Word32 -> SDoc #

Outputable () # 
Instance details

Methods

ppr :: () -> SDoc #

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

Outputable Fingerprint # 
Instance details
Outputable Extension # 
Instance details
Outputable Serialized # 
Instance details
Outputable Name # 
Instance details

Methods

ppr :: Name -> SDoc #

pprPrec :: Rational -> Name -> SDoc #

Outputable OccName # 
Instance details

Methods

ppr :: OccName -> SDoc #

pprPrec :: Rational -> OccName -> SDoc #

Outputable PrimOp # 
Instance details

Methods

ppr :: PrimOp -> SDoc #

pprPrec :: Rational -> PrimOp -> SDoc #

Outputable TyCon # 
Instance details

Methods

ppr :: TyCon -> SDoc #

pprPrec :: Rational -> TyCon -> SDoc #

Outputable FastString # 
Instance details
Outputable ComponentId # 
Instance details
Outputable InstalledUnitId # 
Instance details
Outputable UnitId # 
Instance details

Methods

ppr :: UnitId -> SDoc #

pprPrec :: Rational -> UnitId -> SDoc #

Outputable ModuleName # 
Instance details
Outputable Module # 
Instance details

Methods

ppr :: Module -> SDoc #

pprPrec :: Rational -> Module -> SDoc #

Outputable QualifyName # 
Instance details
Outputable PprStyle # 
Instance details
Outputable TyBinder # 
Instance details
Outputable TCvSubst # 
Instance details
Outputable UnivCoProvenance # 
Instance details
Outputable Coercion # 
Instance details
Outputable TyThing # 
Instance details

Methods

ppr :: TyThing -> SDoc #

pprPrec :: Rational -> TyThing -> SDoc #

Outputable Type # 
Instance details

Methods

ppr :: Type -> SDoc #

pprPrec :: Rational -> Type -> SDoc #

Outputable MetaDetails # 
Instance details
Outputable SrcSpan # 
Instance details

Methods

ppr :: SrcSpan -> SDoc #

pprPrec :: Rational -> SrcSpan -> SDoc #

Outputable RealSrcSpan # 
Instance details
Outputable SrcLoc # 
Instance details

Methods

ppr :: SrcLoc -> SDoc #

pprPrec :: Rational -> SrcLoc -> SDoc #

Outputable RealSrcLoc # 
Instance details
Outputable IdDetails # 
Instance details
Outputable HsDocString # 
Instance details
Outputable IntWithInf # 
Instance details
Outputable FractionalLit # 
Instance details
Outputable IntegralLit # 
Instance details
Outputable InlineSpec # 
Instance details
Outputable InlinePragma # 
Instance details
Outputable RuleMatchInfo # 
Instance details
Outputable Activation # 
Instance details
Outputable CompilerPhase # 
Instance details
Outputable SourceText # 
Instance details
Outputable SuccessFlag # 
Instance details
Outputable TailCallInfo # 
Instance details
Outputable OccInfo # 
Instance details

Methods

ppr :: OccInfo -> SDoc #

pprPrec :: Rational -> OccInfo -> SDoc #

Outputable OverlapMode # 
Instance details
Outputable OverlapFlag # 
Instance details
Outputable DerivStrategy # 
Instance details
Outputable Origin # 
Instance details

Methods

ppr :: Origin -> SDoc #

pprPrec :: Rational -> Origin -> SDoc #

Outputable RecFlag # 
Instance details

Methods

ppr :: RecFlag -> SDoc #

pprPrec :: Rational -> RecFlag -> SDoc #

Outputable Boxity # 
Instance details

Methods

ppr :: Boxity -> SDoc #

pprPrec :: Rational -> Boxity -> SDoc #

Outputable TopLevelFlag # 
Instance details
Outputable LexicalFixity # 
Instance details
Outputable FixityDirection # 
Instance details
Outputable Fixity # 
Instance details

Methods

ppr :: Fixity -> SDoc #

pprPrec :: Rational -> Fixity -> SDoc #

Outputable WarningTxt # 
Instance details
Outputable StringLiteral # 
Instance details
Outputable FunctionOrData # 
Instance details
Outputable SwapFlag # 
Instance details
Outputable OneShotInfo # 
Instance details
Outputable LeftOrRight # 
Instance details
Outputable Unique # 
Instance details

Methods

ppr :: Unique -> SDoc #

pprPrec :: Rational -> Unique -> SDoc #

Outputable RegClass # 
Instance details
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

Methods

ppr :: Reg -> SDoc #

pprPrec :: Rational -> Reg -> SDoc #

Outputable RealReg # 
Instance details

Methods

ppr :: RealReg -> SDoc #

pprPrec :: Rational -> RealReg -> SDoc #

Outputable VirtualReg # 
Instance details
Outputable LabelSet # 
Instance details
Outputable Label # 
Instance details

Methods

ppr :: Label -> SDoc #

pprPrec :: Rational -> Label -> SDoc #

Outputable DefUnitId # 
Instance details
Outputable InstalledModule # 
Instance details
Outputable IndefModule # 
Instance details
Outputable IndefUnitId # 
Instance details
Outputable ModLocation # 
Instance details
Outputable PackageName # 
Instance details
Outputable SourcePackageId # 
Instance details
Outputable CType # 
Instance details

Methods

ppr :: CType -> SDoc #

pprPrec :: Rational -> CType -> SDoc #

Outputable Header # 
Instance details

Methods

ppr :: Header -> SDoc #

pprPrec :: Rational -> Header -> SDoc #

Outputable CCallConv # 
Instance details
Outputable CCallSpec # 
Instance details
Outputable CExportSpec # 
Instance details
Outputable Safety # 
Instance details

Methods

ppr :: Safety -> SDoc #

pprPrec :: Rational -> Safety -> SDoc #

Outputable ForeignCall # 
Instance details
Outputable Phase # 
Instance details

Methods

ppr :: Phase -> SDoc #

pprPrec :: Rational -> Phase -> SDoc #

Outputable WarnReason # 
Instance details
Outputable PackageFlag # 
Instance details
Outputable ModRenaming # 
Instance details
Outputable PackageArg # 
Instance details
Outputable GhcMode # 
Instance details

Methods

ppr :: GhcMode -> SDoc #

pprPrec :: Rational -> GhcMode -> SDoc #

Outputable SafeHaskellMode # 
Instance details
Outputable Language # 
Instance details
Outputable WarnReason # 
Instance details
Outputable ArgDescr # 
Instance details
Outputable ClosureTypeInfo # 
Instance details
Outputable SMRep # 
Instance details

Methods

ppr :: SMRep -> SDoc #

pprPrec :: Rational -> SMRep -> SDoc #

Outputable StgHalfWord # 
Instance details
Outputable StgWord # 
Instance details

Methods

ppr :: StgWord -> SDoc #

pprPrec :: Rational -> StgWord -> SDoc #

Outputable Annotation # 
Instance details
Outputable ModuleOrigin # 
Instance details
Outputable ForeignHint # 
Instance details
Outputable Width # 
Instance details

Methods

ppr :: Width -> SDoc #

pprPrec :: Rational -> Width -> SDoc #

Outputable CmmType # 
Instance details

Methods

ppr :: CmmType -> SDoc #

pprPrec :: Rational -> CmmType -> SDoc #

Outputable AvailInfo # 
Instance details
Outputable ImportSpec # 
Instance details
Outputable Parent # 
Instance details

Methods

ppr :: Parent -> SDoc #

pprPrec :: Rational -> Parent -> SDoc #

Outputable GlobalRdrElt # 
Instance details
Outputable LocalRdrEnv # 
Instance details
Outputable RdrName # 
Instance details

Methods

ppr :: RdrName -> SDoc #

pprPrec :: Rational -> RdrName -> SDoc #

Outputable AnnotationComment # 
Instance details
Outputable AnnKeywordId # 
Instance details
Outputable Token # 
Instance details

Methods

ppr :: Token -> SDoc #

pprPrec :: Rational -> Token -> SDoc #

Outputable ArgFlag # 
Instance details

Methods

ppr :: ArgFlag -> SDoc #

pprPrec :: Rational -> ArgFlag -> SDoc #

Outputable Var # 
Instance details

Methods

ppr :: Var -> SDoc #

pprPrec :: Rational -> Var -> SDoc #

Outputable PatSyn # 
Instance details

Methods

ppr :: PatSyn -> SDoc #

pprPrec :: Rational -> PatSyn -> SDoc #

Outputable IfaceCoercion # 
Instance details
Outputable IfaceTyLit # 
Instance details
Outputable IfaceTyCon # 
Instance details
Outputable IfaceType # 
Instance details
Outputable IfaceTcArgs # 
Instance details
Outputable EqSpec # 
Instance details

Methods

ppr :: EqSpec -> SDoc #

pprPrec :: Rational -> EqSpec -> SDoc #

Outputable DataCon # 
Instance details

Methods

ppr :: DataCon -> SDoc #

pprPrec :: Rational -> DataCon -> SDoc #

Outputable ConLike # 
Instance details

Methods

ppr :: ConLike -> SDoc #

pprPrec :: Rational -> ConLike -> SDoc #

Outputable CostCentreStack # 
Instance details
Outputable CostCentre # 
Instance details
Outputable CoAxiomRule # 
Instance details
Outputable Role # 
Instance details

Methods

ppr :: Role -> SDoc #

pprPrec :: Rational -> Role -> SDoc #

Outputable CoAxBranch # 
Instance details
Outputable LiftingContext # 
Instance details
Outputable Class # 
Instance details

Methods

ppr :: Class -> SDoc #

pprPrec :: Rational -> Class -> SDoc #

Outputable TyConFlavour # 
Instance details
Outputable PrimElemRep # 
Instance details
Outputable PrimRep # 
Instance details

Methods

ppr :: PrimRep -> SDoc #

pprPrec :: Rational -> PrimRep -> SDoc #

Outputable FamTyConFlav # 
Instance details
Outputable AlgTyConFlav # 
Instance details
Outputable IfaceBndr # 
Instance details
Outputable InScopeSet # 
Instance details
Outputable CoercionHole # 
Instance details
Outputable EqRel # 
Instance details

Methods

ppr :: EqRel -> SDoc #

pprPrec :: Rational -> EqRel -> SDoc #

Outputable Literal # 
Instance details

Methods

ppr :: Literal -> SDoc #

pprPrec :: Rational -> Literal -> SDoc #

Outputable StrictnessMark # 
Instance details
Outputable SrcUnpackedness # 
Instance details
Outputable SrcStrictness # 
Instance details
Outputable HsImplBang # 
Instance details
Outputable HsSrcBang # 
Instance details
Outputable SlotTy # 
Instance details

Methods

ppr :: SlotTy -> SDoc #

pprPrec :: Rational -> SlotTy -> SDoc #

Outputable StrictSig # 
Instance details
Outputable DmdType # 
Instance details

Methods

ppr :: DmdType -> SDoc #

pprPrec :: Rational -> DmdType -> SDoc #

Outputable CPRResult # 
Instance details
Outputable TypeShape # 
Instance details
Outputable Count # 
Instance details

Methods

ppr :: Count -> SDoc #

pprPrec :: Rational -> Count -> SDoc #

Outputable UseDmd # 
Instance details

Methods

ppr :: UseDmd -> SDoc #

pprPrec :: Rational -> UseDmd -> SDoc #

Outputable StrDmd # 
Instance details

Methods

ppr :: StrDmd -> SDoc #

pprPrec :: Rational -> StrDmd -> SDoc #

Outputable UnfoldingGuidance # 
Instance details
Outputable UnfoldingSource # 
Instance details
Outputable Unfolding # 
Instance details
Outputable CoreVect # 
Instance details
Outputable CoreRule # 
Instance details
Outputable AltCon # 
Instance details

Methods

ppr :: AltCon -> SDoc #

pprPrec :: Rational -> AltCon -> SDoc #

Outputable FamInstMatch # 
Instance details
Outputable FamInst # 
Instance details

Methods

ppr :: FamInst -> SDoc #

pprPrec :: Rational -> FamInst -> SDoc #

Outputable LevityInfo # 
Instance details
Outputable TickBoxOp # 
Instance details
Outputable CafInfo # 
Instance details

Methods

ppr :: CafInfo -> SDoc #

pprPrec :: Rational -> CafInfo -> SDoc #

Outputable RecSelParent # 
Instance details
Outputable UnVarGraph # 
Instance details
Outputable UnVarSet # 
Instance details
Outputable PrimCall # 
Instance details
Outputable CgBreakInfo # 
Instance details
Outputable UnlinkedBCO # 
Instance details
Outputable CompiledByteCode # 
Instance details
Outputable CoreStats # 
Instance details
Outputable UpdateFlag # 
Instance details
Outputable AltType # 
Instance details

Methods

ppr :: AltType -> SDoc #

pprPrec :: Rational -> AltType -> SDoc #

Outputable ShowHowMuch # 
Instance details
Outputable IfaceJoinInfo # 
Instance details
Outputable IfaceConAlt # 
Instance details
Outputable IfaceExpr # 
Instance details
Outputable IfaceIdDetails # 
Instance details
Outputable IfaceUnfolding # 
Instance details
Outputable IfaceInfoItem # 
Instance details
Outputable IfaceIdInfo # 
Instance details
Outputable IfaceCompleteMatch # 
Instance details
Outputable IfaceAnnotation # 
Instance details
Outputable IfaceRule # 
Instance details
Outputable IfaceFamInst # 
Instance details
Outputable IfaceClsInst # 
Instance details
Outputable IfaceAT # 
Instance details

Methods

ppr :: IfaceAT -> SDoc #

pprPrec :: Rational -> IfaceAT -> SDoc #

Outputable IfaceClassOp # 
Instance details
Outputable IfaceTyConParent # 
Instance details
Outputable IfaceDecl # 
Instance details
Outputable ForeignLabelSource # 
Instance details
Outputable CLabel # 
Instance details

Methods

ppr :: CLabel -> SDoc #

pprPrec :: Rational -> CLabel -> SDoc #

Outputable GlobalReg # 
Instance details
Outputable LocalReg # 
Instance details
Outputable CmmLit # 
Instance details

Methods

ppr :: CmmLit -> SDoc #

pprPrec :: Rational -> CmmLit -> SDoc #

Outputable Area # 
Instance details

Methods

ppr :: Area -> SDoc #

pprPrec :: Rational -> Area -> SDoc #

Outputable CmmReg # 
Instance details

Methods

ppr :: CmmReg -> SDoc #

pprPrec :: Rational -> CmmReg -> SDoc #

Outputable CmmExpr # 
Instance details

Methods

ppr :: CmmExpr -> SDoc #

pprPrec :: Rational -> CmmExpr -> SDoc #

Outputable CmmTickScope # 
Instance details
Outputable ForeignTarget # 
Instance details
Outputable CmmReturnInfo # 
Instance details
Outputable ForeignConvention # 
Instance details
Outputable Convention # 
Instance details
Outputable CmmStatics # 
Instance details
Outputable CmmStatic # 
Instance details
Outputable C_SRT # 
Instance details

Methods

ppr :: C_SRT -> SDoc #

pprPrec :: Rational -> C_SRT -> SDoc #

Outputable CmmInfoTable # 
Instance details
Outputable CmmStackInfo # 
Instance details
Outputable CmmTopInfo # 
Instance details
Outputable CmmGraph # 
Instance details
Outputable LlvmCastOp # 
Instance details
Outputable LlvmCmpOp # 
Instance details
Outputable LlvmMachOp # 
Instance details
Outputable LlvmLinkageType # 
Instance details
Outputable LlvmCallConvention # 
Instance details
Outputable LlvmFuncAttr # 
Instance details
Outputable LlvmParamAttr # 
Instance details
Outputable LlvmFunctionDecl # 
Instance details
Outputable LlvmStatic # 
Instance details
Outputable LlvmLit # 
Instance details

Methods

ppr :: LlvmLit -> SDoc #

pprPrec :: Rational -> LlvmLit -> SDoc #

Outputable LlvmVar # 
Instance details

Methods

ppr :: LlvmVar -> SDoc #

pprPrec :: Rational -> LlvmVar -> SDoc #

Outputable LlvmType # 
Instance details
Outputable MetaExpr # 
Instance details
Outputable MetaId # 
Instance details

Methods

ppr :: MetaId -> SDoc #

pprPrec :: Rational -> MetaId -> SDoc #

Outputable LiveInfo # 
Instance details
Outputable Loc # 
Instance details

Methods

ppr :: Loc -> SDoc #

pprPrec :: Rational -> Loc -> SDoc #

Outputable SpillStats # 
Instance details
Outputable UnwindExpr # 
Instance details
Outputable UnwindPoint # 
Instance details
Outputable DebugBlock # 
Instance details
Outputable Status # 
Instance details

Methods

ppr :: Status -> SDoc #

pprPrec :: Rational -> Status -> SDoc #

Outputable ParamLocation # 
Instance details
Outputable TopSRT # 
Instance details

Methods

ppr :: TopSRT -> SDoc #

pprPrec :: Rational -> TopSRT -> SDoc #

Outputable CandidatesQTvs # 
Instance details
Outputable TcLevel # 
Instance details

Methods

ppr :: TcLevel -> SDoc #

pprPrec :: Rational -> TcLevel -> SDoc #

Outputable InferResult # 
Instance details
Outputable ExpType # 
Instance details

Methods

ppr :: ExpType -> SDoc #

pprPrec :: Rational -> ExpType -> SDoc #

Outputable EvCallStack # 
Instance details
Outputable EvLit # 
Instance details

Methods

ppr :: EvLit -> SDoc #

pprPrec :: Rational -> EvLit -> SDoc #

Outputable EvTypeable # 
Instance details
Outputable EvTerm # 
Instance details

Methods

ppr :: EvTerm -> SDoc #

pprPrec :: Rational -> EvTerm -> SDoc #

Outputable EvBind # 
Instance details

Methods

ppr :: EvBind -> SDoc #

pprPrec :: Rational -> EvBind -> SDoc #

Outputable EvBindMap # 
Instance details
Outputable EvBindsVar # 
Instance details
Outputable TcEvBinds # 
Instance details
Outputable HsWrapper # 
Instance details
Outputable HsTyLit # 
Instance details

Methods

ppr :: HsTyLit -> SDoc #

pprPrec :: Rational -> HsTyLit -> SDoc #

Outputable HsIPName # 
Instance details
Outputable OverLitVal # 
Instance details
Outputable TcSpecPrag # 
Instance details
Outputable CgLoc # 
Instance details

Methods

ppr :: CgLoc -> SDoc #

pprPrec :: Rational -> CgLoc -> SDoc #

Outputable Sequel # 
Instance details

Methods

ppr :: Sequel -> SDoc #

pprPrec :: Rational -> Sequel -> SDoc #

Outputable CgIdInfo # 
Instance details
Outputable ArgRep # 
Instance details

Methods

ppr :: ArgRep -> SDoc #

pprPrec :: Rational -> ArgRep -> SDoc #

Outputable ClsInst # 
Instance details

Methods

ppr :: ClsInst -> SDoc #

pprPrec :: Rational -> ClsInst -> SDoc #

Outputable DocDecl # 
Instance details

Methods

ppr :: DocDecl -> SDoc #

pprPrec :: Rational -> DocDecl -> SDoc #

Outputable ForeignExport # 
Instance details
Outputable ForeignImport # 
Instance details
Outputable NewOrData # 
Instance details
Outputable PendingTcSplice # 
Instance details
Outputable PendingRnSplice # 
Instance details
Outputable SpliceDecoration # 
Instance details
Outputable UnboundVar # 
Instance details
Outputable PmLit # 
Instance details

Methods

ppr :: PmLit -> SDoc #

pprPrec :: Rational -> PmLit -> SDoc #

Outputable PmExpr # 
Instance details

Methods

ppr :: PmExpr -> SDoc #

pprPrec :: Rational -> PmExpr -> SDoc #

Outputable CompleteMatch # 
Instance details
Outputable Unlinked # 
Instance details
Outputable Linkable # 
Instance details
Outputable IfaceTrustInfo # 
Instance details
Outputable IfaceVectInfo # 
Instance details
Outputable VectInfo # 
Instance details
Outputable ModSummary # 
Instance details
Outputable FixItem # 
Instance details

Methods

ppr :: FixItem -> SDoc #

pprPrec :: Rational -> FixItem -> SDoc #

Outputable Warnings # 
Instance details
Outputable InteractiveImport # 
Instance details
Outputable SptEntry # 
Instance details
Outputable TargetId # 
Instance details
Outputable Target # 
Instance details

Methods

ppr :: Target -> SDoc #

pprPrec :: Rational -> Target -> SDoc #

Outputable TypeOrKind # 
Instance details
Outputable CtOrigin # 
Instance details
Outputable SkolemInfo # 
Instance details
Outputable SubGoalDepth # 
Instance details
Outputable CtFlavour # 
Instance details
Outputable CtEvidence # 
Instance details
Outputable TcEvDest # 
Instance details
Outputable ImplicStatus # 
Instance details
Outputable Implication # 
Instance details
Outputable WantedConstraints # 
Instance details
Outputable Hole # 
Instance details

Methods

ppr :: Hole -> SDoc #

pprPrec :: Rational -> Hole -> SDoc #

Outputable Ct # 
Instance details

Methods

ppr :: Ct -> SDoc #

pprPrec :: Rational -> Ct -> SDoc #

Outputable TcPatSynInfo # 
Instance details
Outputable TcIdSigInst # 
Instance details
Outputable TcIdSigInfo # 
Instance details
Outputable TcSigInfo # 
Instance details
Outputable WhereFrom # 
Instance details
Outputable IdBindingInfo # 
Instance details
Outputable PromotionErr # 
Instance details
Outputable TcTyThing # 
Instance details
Outputable ThStage # 
Instance details

Methods

ppr :: ThStage -> SDoc #

pprPrec :: Rational -> ThStage -> SDoc #

Outputable TcBinder # 
Instance details
Outputable PhasePlus # 
Instance details
Outputable HsComponentId # 
Instance details
Outputable FloatBind # 
Instance details
Outputable Subst # 
Instance details

Methods

ppr :: Subst -> SDoc #

pprPrec :: Rational -> Subst -> SDoc #

Outputable CallCtxt # 
Instance details
Outputable ArgSummary # 
Instance details
Outputable Tick # 
Instance details

Methods

ppr :: Tick -> SDoc #

pprPrec :: Rational -> Tick -> SDoc #

Outputable FloatOutSwitches # 
Instance details
Outputable SimplMode # 
Instance details
Outputable CoreToDo # 
Instance details
Outputable LetFloats # 
Instance details
Outputable SimplSR # 
Instance details

Methods

ppr :: SimplSR -> SDoc #

pprPrec :: Rational -> SimplSR -> SDoc #

Outputable SimplFloats # 
Instance details
Outputable ArgSpec # 
Instance details

Methods

ppr :: ArgSpec -> SDoc #

pprPrec :: Rational -> ArgSpec -> SDoc #

Outputable DupFlag # 
Instance details

Methods

ppr :: DupFlag -> SDoc #

pprPrec :: Rational -> DupFlag -> SDoc #

Outputable SimplCont # 
Instance details
Outputable FloatSpec # 
Instance details
Outputable Level # 
Instance details

Methods

ppr :: Level -> SDoc #

pprPrec :: Rational -> Level -> SDoc #

Outputable HsSigCtxt # 
Instance details
Outputable ChildLookupResult # 
Instance details
Outputable ClosureType # 
Instance details
Outputable Term # 
Instance details

Methods

ppr :: Term -> SDoc #

pprPrec :: Rational -> Term -> SDoc #

Outputable InertCans # 
Instance details
Outputable InertSet # 
Instance details
Outputable WorkList # 
Instance details
Outputable FlattenMode # 
Instance details
Outputable InferMode # 
Instance details
Outputable ThetaOrigin # 
Instance details
Outputable PredOrigin # 
Instance details
Outputable DerivSpecMechanism # 
Instance details
Outputable DerivEnv # 
Instance details
Outputable BCInstr # 
Instance details

Methods

ppr :: BCInstr -> SDoc #

pprPrec :: Rational -> BCInstr -> SDoc #

Outputable LetBndrSpec # 
Instance details
Outputable EquationInfo # 
Instance details
Outputable DsMatchContext # 
Instance details
Outputable CompRepr # 
Instance details
Outputable ProdRepr # 
Instance details
Outputable ConRepr # 
Instance details

Methods

ppr :: ConRepr -> SDoc #

pprPrec :: Rational -> ConRepr -> SDoc #

Outputable SumRepr # 
Instance details

Methods

ppr :: SumRepr -> SDoc #

pprPrec :: Rational -> SumRepr -> SDoc #

Outputable Instr # 
Instance details

Methods

ppr :: Instr -> SDoc #

pprPrec :: Rational -> Instr -> SDoc #

Outputable Instr # 
Instance details

Methods

ppr :: Instr -> SDoc #

pprPrec :: Rational -> Instr -> SDoc #

Outputable Instr # 
Instance details

Methods

ppr :: Instr -> SDoc #

pprPrec :: Rational -> Instr -> SDoc #

Outputable DwarfFrameBlock # 
Instance details
Outputable CoreModule # 
Instance details
Outputable a => Outputable [a] # 
Instance details

Methods

ppr :: [a] -> SDoc #

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

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

Methods

ppr :: Maybe a -> SDoc #

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

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

Methods

ppr :: IntMap elt -> SDoc #

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

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

Methods

ppr :: SCC a -> SDoc #

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

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

Methods

ppr :: Set a -> SDoc #

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

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

Methods

ppr :: Pair a -> SDoc #

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

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

Methods

ppr :: OrdList a -> SDoc #

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

Outputable (DefMethSpec ty) # 
Instance details

Methods

ppr :: DefMethSpec ty -> SDoc #

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

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

Methods

ppr :: UniqFM a -> SDoc #

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

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

Methods

ppr :: UniqSet a -> SDoc #

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

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

Methods

ppr :: UniqDFM a -> SDoc #

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

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

Methods

ppr :: LabelMap a -> SDoc #

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

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

Methods

ppr :: Graph node -> SDoc #

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

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

Methods

ppr :: Bag a -> SDoc #

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

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

Methods

ppr :: OccEnv a -> SDoc #

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

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

Methods

ppr :: FieldLbl a -> SDoc #

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

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

Methods

ppr :: AnnTarget name -> SDoc #

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

Outputable (CoAxiom br) # 
Instance details

Methods

ppr :: CoAxiom br -> SDoc #

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

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

Methods

ppr :: TaggedBndr b -> SDoc #

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

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

Methods

ppr :: Tickish id -> SDoc #

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

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

Methods

ppr :: Bind b -> SDoc #

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

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

Methods

ppr :: Expr b -> SDoc #

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

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

Methods

ppr :: CoreMap a -> SDoc #

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

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

Methods

ppr :: GenStgArg bdee -> SDoc #

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

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

Methods

ppr :: ListGraph instr -> SDoc #

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

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

Methods

ppr :: GenBasicBlock instr -> SDoc #

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

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

Methods

ppr :: LiveInstr instr -> SDoc #

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

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

Methods

ppr :: InstrSR instr -> SDoc #

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

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

Methods

ppr :: Pat pass -> SDoc #

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

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

Methods

ppr :: IE pass -> SDoc #

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

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

Methods

ppr :: IEWrappedName name -> SDoc #

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

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

Methods

ppr :: ImportDecl pass -> SDoc #

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

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

Methods

ppr :: SyntaxExpr p -> SDoc #

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

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

Methods

ppr :: HsSplice p -> SDoc #

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

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

Methods

ppr :: HsCmd p -> SDoc #

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

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

Methods

ppr :: HsExpr p -> SDoc #

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

Outputable (AmbiguousFieldOcc pass) # 
Instance details
Outputable (FieldOcc pass) # 
Instance details

Methods

ppr :: FieldOcc pass -> SDoc #

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

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

Methods

ppr :: ConDeclField pass -> SDoc #

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

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

Methods

ppr :: HsAppType pass -> SDoc #

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

Outputable (HsWildCardInfo pass) # 
Instance details

Methods

ppr :: HsWildCardInfo pass -> SDoc #

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

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

Methods

ppr :: HsType pass -> SDoc #

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

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

Methods

ppr :: HsTyVarBndr pass -> SDoc #

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

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

Methods

ppr :: LHsQTyVars pass -> SDoc #

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

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

Methods

ppr :: HsOverLit p -> SDoc #

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

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

Methods

ppr :: HsLit x -> SDoc #

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

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

Methods

ppr :: FixitySig pass -> SDoc #

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

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

Methods

ppr :: Sig pass -> SDoc #

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

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

Methods

ppr :: IPBind p -> SDoc #

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

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

Methods

ppr :: HsIPBinds p -> SDoc #

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

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

Methods

ppr :: ABExport p -> SDoc #

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

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

Methods

ppr :: NonVoid a -> SDoc #

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

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

Methods

ppr :: RoleAnnotDecl pass -> SDoc #

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

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

Methods

ppr :: AnnDecl pass -> SDoc #

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

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

Methods

ppr :: WarnDecl pass -> SDoc #

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

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

Methods

ppr :: WarnDecls pass -> SDoc #

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

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

Methods

ppr :: VectDecl pass -> SDoc #

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

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

Methods

ppr :: RuleBndr pass -> SDoc #

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

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

Methods

ppr :: RuleDecl pass -> SDoc #

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

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

Methods

ppr :: RuleDecls pass -> SDoc #

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

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

Methods

ppr :: ForeignDecl pass -> SDoc #

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

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

Methods

ppr :: DefaultDecl pass -> SDoc #

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

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

Methods

ppr :: DerivDecl pass -> SDoc #

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

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

Methods

ppr :: InstDecl pass -> SDoc #

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

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

Methods

ppr :: ClsInstDecl pass -> SDoc #

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

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

Methods

ppr :: DataFamInstDecl pass -> SDoc #

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

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

Methods

ppr :: TyFamInstDecl pass -> SDoc #

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

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

Methods

ppr :: ConDecl pass -> SDoc #

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

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

Methods

ppr :: HsDataDefn pass -> SDoc #

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

Outputable (FamilyInfo pass) # 
Instance details

Methods

ppr :: FamilyInfo pass -> SDoc #

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

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

Methods

ppr :: FamilyDecl pass -> SDoc #

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

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

Methods

ppr :: TyClGroup pass -> SDoc #

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

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

Methods

ppr :: TyClDecl pass -> SDoc #

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

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

Methods

ppr :: SpliceDecl pass -> SDoc #

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

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

Methods

ppr :: HsGroup pass -> SDoc #

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

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

Methods

ppr :: HsDecl pass -> SDoc #

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

(Outputable p, Outputable (NameOrRdrName p)) => Outputable (HsStmtContext p) # 
Instance details
OutputableBndr id => Outputable (HsMatchContext id) # 
Instance details
(SourceTextX p, OutputableBndrId p) => Outputable (ArithSeqInfo p) # 
Instance details
(SourceTextX p, OutputableBndrId p) => Outputable (HsBracket p) # 
Instance details

Methods

ppr :: HsBracket p -> SDoc #

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

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

Methods

ppr :: HsCmdTop p -> SDoc #

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

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

Methods

ppr :: HsModule pass -> SDoc #

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

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

Methods

ppr :: InstInfo a -> SDoc #

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

Outputable (FunDepEqn a) # 
Instance details

Methods

ppr :: FunDepEqn a -> SDoc #

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

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

Methods

ppr :: DerivSpec theta -> SDoc #

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

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

Methods

ppr :: ProtoBCO a -> SDoc #

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

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

Methods

ppr :: Either a b -> SDoc #

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

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

Methods

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

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

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

Methods

ppr :: Map key elt -> SDoc #

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

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

Methods

ppr :: GenLocated l e -> SDoc #

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

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

Methods

ppr :: UniqMap k a -> SDoc #

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

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

Methods

ppr :: Node a b -> SDoc #

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

Outputable tv => Outputable (TyVarBndr tv ArgFlag) # 
Instance details
Outputable tv => Outputable (TyVarBndr tv TyConBndrVis) # 
Instance details
(TrieMap m, Outputable a) => Outputable (ListMap m a) # 
Instance details

Methods

ppr :: ListMap m a -> SDoc #

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

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

Methods

ppr :: GenStgRhs bndr bdee -> SDoc #

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

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

Methods

ppr :: GenStgExpr bndr bdee -> SDoc #

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

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

Methods

ppr :: GenStgBinding bndr bdee -> SDoc #

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

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

Methods

ppr :: GenStgTopBinding bndr bdee -> SDoc #

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

Outputable (CmmNode e x) # 
Instance details

Methods

ppr :: CmmNode e x -> SDoc #

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

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

Methods

ppr :: HsConDetails arg rec -> SDoc #

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

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

Methods

ppr :: HsWildCardBndrs pass thing -> SDoc #

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

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

Methods

ppr :: HsImplicitBndrs pass thing -> SDoc #

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

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

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

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

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

Methods

ppr :: HsLocalBindsLR idL idR -> SDoc #

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

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

Methods

ppr :: HsRecField' p arg -> SDoc #

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

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

Methods

ppr :: HsRecFields p arg -> SDoc #

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

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

Methods

ppr :: ParStmtBlock idL idR -> SDoc #

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

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

Methods

ppr :: Match idR body -> SDoc #

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

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

Methods

ppr :: RegAllocStats statics instr -> SDoc #

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

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

Methods

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

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

Outputable (Block CmmNode C C) # 
Instance details
Outputable (Block CmmNode C O) # 
Instance details
Outputable (Block CmmNode O C) # 
Instance details
Outputable (Block CmmNode O O) # 
Instance details
Outputable (Graph CmmNode e x) # 
Instance details

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

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

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

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

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

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

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
OutputableBndr OccName # 
Instance details
OutputableBndr RdrName # 
Instance details
OutputableBndr Var # 
Instance details
OutputableBndr PatSyn # 
Instance details
OutputableBndr DataCon # 
Instance details
OutputableBndr ConLike # 
Instance details
OutputableBndr HsIPName # 
Instance details
Outputable b => OutputableBndr (TaggedBndr b) # 
Instance details
OutputableBndr name => OutputableBndr (IEWrappedName name) # 
Instance details
OutputableBndr (AmbiguousFieldOcc pass) # 
Instance details

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

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

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 #