Outputable

ghc-8.0.1: The GHC API

Safe Haskell | None
Language | Haskell2010

Outputable

Contents

- Type classes
- Pretty printing combinators
- Converting `SDoc` into strings and outputing it
- Controlling the style in which output is printed
- Error handling and debugging utilities

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

- class Outputable a where
- class Outputable a => OutputableBndr a where
- data SDoc
- runSDoc :: SDoc -> SDocContext -> Doc
- initSDocContext :: DynFlags -> PprStyle -> SDocContext
- docToSDoc :: Doc -> SDoc
- interppSP :: Outputable a => [a] -> SDoc
- interpp'SP :: Outputable a => [a] -> SDoc
- pprQuotedList :: Outputable a => [a] -> SDoc
- pprWithCommas :: (a -> SDoc) -> [a] -> SDoc
- quotedListWithOr :: [SDoc] -> SDoc
- quotedListWithNor :: [SDoc] -> SDoc
- empty :: SDoc
- isEmpty :: DynFlags -> SDoc -> Bool
- nest :: Int -> SDoc -> SDoc
- char :: Char -> SDoc
- text :: String -> SDoc
- ftext :: FastString -> SDoc
- ptext :: LitString -> SDoc
- ztext :: FastZString -> SDoc
- int :: Int -> SDoc
- intWithCommas :: Integral a => a -> SDoc
- integer :: Integer -> SDoc
- float :: Float -> SDoc
- double :: Double -> SDoc
- rational :: Rational -> SDoc
- doublePrec :: Int -> Double -> SDoc
- parens :: SDoc -> SDoc
- cparen :: Bool -> SDoc -> SDoc
- brackets :: SDoc -> SDoc
- braces :: SDoc -> SDoc
- quotes :: SDoc -> SDoc
- quote :: SDoc -> SDoc
- doubleQuotes :: SDoc -> SDoc
- angleBrackets :: SDoc -> SDoc
- paBrackets :: SDoc -> SDoc
- semi :: SDoc
- comma :: SDoc
- colon :: SDoc
- dcolon :: SDoc
- space :: SDoc
- equals :: SDoc
- dot :: SDoc
- vbar :: SDoc
- arrow :: SDoc
- larrow :: SDoc
- darrow :: SDoc
- arrowt :: SDoc
- larrowt :: SDoc
- arrowtt :: SDoc
- larrowtt :: SDoc
- lparen :: SDoc
- rparen :: SDoc
- lbrack :: SDoc
- rbrack :: SDoc
- lbrace :: SDoc
- rbrace :: SDoc
- underscore :: SDoc
- blankLine :: SDoc
- forAllLit :: SDoc
- (<>) :: SDoc -> SDoc -> SDoc
- (<+>) :: SDoc -> SDoc -> SDoc
- hcat :: [SDoc] -> SDoc
- hsep :: [SDoc] -> SDoc
- ($$) :: SDoc -> SDoc -> SDoc
- ($+$) :: SDoc -> SDoc -> SDoc
- vcat :: [SDoc] -> SDoc
- sep :: [SDoc] -> SDoc
- cat :: [SDoc] -> SDoc
- fsep :: [SDoc] -> SDoc
- fcat :: [SDoc] -> SDoc
- hang :: SDoc -> Int -> SDoc -> SDoc
- hangNotEmpty :: SDoc -> Int -> SDoc -> SDoc
- punctuate :: SDoc -> [SDoc] -> [SDoc]
- ppWhen :: Bool -> SDoc -> SDoc
- ppUnless :: Bool -> SDoc -> SDoc
- speakNth :: Int -> SDoc
- speakN :: Int -> SDoc
- speakNOf :: Int -> SDoc -> SDoc
- plural :: [a] -> SDoc
- isOrAre :: [a] -> SDoc
- doOrDoes :: [a] -> SDoc
- unicodeSyntax :: SDoc -> SDoc -> SDoc
- coloured :: PprColour -> SDoc -> SDoc
- data PprColour
- colType :: PprColour
- colCoerc :: PprColour
- colDataCon :: PprColour
- colBinder :: PprColour
- bold :: SDoc -> SDoc
- keyword :: SDoc -> SDoc
- printForC :: DynFlags -> Handle -> SDoc -> IO ()
- printForAsm :: DynFlags -> Handle -> SDoc -> IO ()
- printForUser :: DynFlags -> Handle -> PrintUnqualified -> SDoc -> IO ()
- printForUserPartWay :: DynFlags -> Handle -> Int -> PrintUnqualified -> SDoc -> IO ()
- pprCode :: CodeStyle -> SDoc -> SDoc
- mkCodeStyle :: CodeStyle -> PprStyle
- showSDoc :: DynFlags -> SDoc -> String
- showSDocUnsafe :: SDoc -> String
- showSDocOneLine :: DynFlags -> SDoc -> String
- showSDocForUser :: DynFlags -> PrintUnqualified -> SDoc -> String
- showSDocDebug :: DynFlags -> SDoc -> String
- showSDocDump :: DynFlags -> SDoc -> String
- showSDocDumpOneLine :: DynFlags -> SDoc -> String
- showSDocUnqual :: DynFlags -> SDoc -> String
- showPpr :: Outputable a => DynFlags -> a -> String
- renderWithStyle :: DynFlags -> SDoc -> PprStyle -> String
- pprInfixVar :: Bool -> SDoc -> SDoc
- pprPrefixVar :: Bool -> SDoc -> SDoc
- pprHsChar :: Char -> SDoc
- pprHsString :: FastString -> SDoc
- pprHsBytes :: ByteString -> SDoc
- primFloatSuffix :: SDoc
- primDoubleSuffix :: SDoc
- pprPrimChar :: Char -> SDoc
- pprPrimInt :: Integer -> SDoc
- pprPrimWord :: Integer -> SDoc
- pprPrimInt64 :: Integer -> SDoc
- pprPrimWord64 :: Integer -> SDoc
- pprFastFilePath :: FastString -> SDoc
- data BindingSite
  - = LambdaBind
  - | CaseBind
  - | LetBind
- data PprStyle
- data CodeStyle
  - = CStyle
  - | AsmStyle
- data PrintUnqualified = QueryQualify {
  - queryQualifyName :: QueryQualifyName
  - queryQualifyModule :: QueryQualifyModule
  - queryQualifyPackage :: QueryQualifyPackage
  }
- type QueryQualifyName = Module -> OccName -> QualifyName
- type QueryQualifyModule = Module -> Bool
- type QueryQualifyPackage = UnitId -> Bool
- reallyAlwaysQualify :: PrintUnqualified
- reallyAlwaysQualifyNames :: QueryQualifyName
- alwaysQualify :: PrintUnqualified
- alwaysQualifyNames :: QueryQualifyName
- alwaysQualifyModules :: QueryQualifyModule
- neverQualify :: PrintUnqualified
- neverQualifyNames :: QueryQualifyName
- neverQualifyModules :: QueryQualifyModule
- alwaysQualifyPackages :: QueryQualifyPackage
- neverQualifyPackages :: QueryQualifyPackage
- data QualifyName
  - = NameUnqual
  - | NameQual ModuleName
  - | NameNotInScope1
  - | NameNotInScope2
- queryQual :: PprStyle -> PrintUnqualified
- sdocWithDynFlags :: (DynFlags -> SDoc) -> SDoc
- sdocWithPlatform :: (Platform -> SDoc) -> SDoc
- getPprStyle :: (PprStyle -> SDoc) -> SDoc
- withPprStyle :: PprStyle -> SDoc -> SDoc
- withPprStyleDoc :: DynFlags -> PprStyle -> SDoc -> Doc
- pprDeeper :: SDoc -> SDoc
- pprDeeperList :: ([SDoc] -> SDoc) -> [SDoc] -> SDoc
- pprSetDepth :: Depth -> SDoc -> SDoc
- codeStyle :: PprStyle -> Bool
- userStyle :: PprStyle -> Bool
- debugStyle :: PprStyle -> Bool
- dumpStyle :: PprStyle -> Bool
- asmStyle :: PprStyle -> Bool
- ifPprDebug :: SDoc -> SDoc
- qualName :: PprStyle -> QueryQualifyName
- qualModule :: PprStyle -> QueryQualifyModule
- qualPackage :: PprStyle -> QueryQualifyPackage
- mkErrStyle :: DynFlags -> PrintUnqualified -> PprStyle
- defaultErrStyle :: DynFlags -> PprStyle
- defaultDumpStyle :: PprStyle
- mkDumpStyle :: PrintUnqualified -> PprStyle
- defaultUserStyle :: PprStyle
- mkUserStyle :: PrintUnqualified -> Depth -> PprStyle
- cmdlineParserStyle :: PprStyle
- data Depth
  - = AllTheWay
  - | PartWay Int
- pprPanic :: String -> SDoc -> a
- pprSorry :: String -> SDoc -> a
- assertPprPanic :: (?callStack :: CallStack) => String -> Int -> SDoc -> a
- pprPgmError :: String -> SDoc -> a
- pprTrace :: String -> SDoc -> a -> a
- pprTraceIt :: Outputable a => String -> a -> a
- warnPprTrace :: Bool -> String -> Int -> SDoc -> a -> a
- pprSTrace :: (?callStack :: CallStack) => SDoc -> a -> a
- trace :: String -> a -> a
- pgmError :: String -> a
- panic :: String -> a
- sorry :: String -> a
- assertPanic :: String -> Int -> a
- pprDebugAndThen :: DynFlags -> (String -> a) -> SDoc -> SDoc -> a

# 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 # |
Methods ppr :: Bool -> SDoc # pprPrec :: Rational -> Bool -> SDoc #
Outputable Char # |
Methods ppr :: Char -> SDoc # pprPrec :: Rational -> Char -> SDoc #
Outputable Int # |
Methods ppr :: Int -> SDoc # pprPrec :: Rational -> Int -> SDoc #
Outputable Int32 # |
Methods ppr :: Int32 -> SDoc # pprPrec :: Rational -> Int32 -> SDoc #
Outputable Int64 # |
Methods ppr :: Int64 -> SDoc # pprPrec :: Rational -> Int64 -> SDoc #
Outputable Ordering # |
Methods ppr :: Ordering -> SDoc # pprPrec :: Rational -> Ordering -> SDoc #
Outputable Word # |
Methods ppr :: Word -> SDoc # pprPrec :: Rational -> Word -> SDoc #
Outputable Word16 # |
Methods ppr :: Word16 -> SDoc # pprPrec :: Rational -> Word16 -> SDoc #
Outputable Word32 # |
Methods ppr :: Word32 -> SDoc # pprPrec :: Rational -> Word32 -> SDoc #
Outputable () # |
Methods ppr :: () -> SDoc # pprPrec :: Rational -> () -> SDoc #
Outputable Fingerprint # |
Methods ppr :: Fingerprint -> SDoc # pprPrec :: Rational -> Fingerprint -> SDoc #
Outputable Serialized # |
Methods ppr :: Serialized -> SDoc # pprPrec :: Rational -> Serialized -> SDoc #
Outputable PrimOp # |
Methods ppr :: PrimOp -> SDoc # pprPrec :: Rational -> PrimOp -> SDoc #
Outputable OccName # |
Methods ppr :: OccName -> SDoc # pprPrec :: Rational -> OccName -> SDoc #
Outputable UnitId # |
Methods ppr :: UnitId -> SDoc # pprPrec :: Rational -> UnitId -> SDoc #
Outputable ModuleName # |
Methods ppr :: ModuleName -> SDoc # pprPrec :: Rational -> ModuleName -> SDoc #
Outputable Module # |
Methods ppr :: Module -> SDoc # pprPrec :: Rational -> Module -> SDoc #
Outputable Name # |
Methods ppr :: Name -> SDoc # pprPrec :: Rational -> Name -> SDoc #
Outputable FastString # |
Methods ppr :: FastString -> SDoc # pprPrec :: Rational -> FastString -> SDoc #
Outputable PprStyle # |
Methods ppr :: PprStyle -> SDoc # pprPrec :: Rational -> PprStyle -> SDoc #
Outputable IdDetails # |
Methods ppr :: IdDetails -> SDoc # pprPrec :: Rational -> IdDetails -> SDoc #
Outputable SrcSpan # |
Methods ppr :: SrcSpan -> SDoc # pprPrec :: Rational -> SrcSpan -> SDoc #
Outputable RealSrcSpan # |
Methods ppr :: RealSrcSpan -> SDoc # pprPrec :: Rational -> RealSrcSpan -> SDoc #
Outputable SrcLoc # |
Methods ppr :: SrcLoc -> SDoc # pprPrec :: Rational -> SrcLoc -> SDoc #
Outputable RealSrcLoc # |
Methods ppr :: RealSrcLoc -> SDoc # pprPrec :: Rational -> RealSrcLoc -> SDoc #
Outputable HsDocString # |
Methods ppr :: HsDocString -> SDoc # pprPrec :: Rational -> HsDocString -> SDoc #
Outputable MetaDetails # |
Methods ppr :: MetaDetails -> SDoc # pprPrec :: Rational -> MetaDetails -> SDoc #
Outputable TCvSubst # |
Methods ppr :: TCvSubst -> SDoc # pprPrec :: Rational -> TCvSubst -> SDoc #
Outputable UnivCoProvenance # |
Methods ppr :: UnivCoProvenance -> SDoc # pprPrec :: Rational -> UnivCoProvenance -> SDoc #
Outputable LeftOrRight # |
Methods ppr :: LeftOrRight -> SDoc # pprPrec :: Rational -> LeftOrRight -> SDoc #
Outputable Coercion # |
Methods ppr :: Coercion -> SDoc # pprPrec :: Rational -> Coercion -> SDoc #
Outputable TyThing # |
Methods ppr :: TyThing -> SDoc # pprPrec :: Rational -> TyThing -> SDoc #
Outputable TyBinder # |
Methods ppr :: TyBinder -> SDoc # pprPrec :: Rational -> TyBinder -> SDoc #
Outputable Type # |
Methods ppr :: Type -> SDoc # pprPrec :: Rational -> Type -> SDoc #
Outputable IntWithInf # |
Methods ppr :: IntWithInf -> SDoc # pprPrec :: Rational -> IntWithInf -> SDoc #
Outputable FractionalLit # |
Methods ppr :: FractionalLit -> SDoc # pprPrec :: Rational -> FractionalLit -> SDoc #
Outputable InlineSpec # |
Methods ppr :: InlineSpec -> SDoc # pprPrec :: Rational -> InlineSpec -> SDoc #
Outputable InlinePragma # |
Methods ppr :: InlinePragma -> SDoc # pprPrec :: Rational -> InlinePragma -> SDoc #
Outputable RuleMatchInfo # |
Methods ppr :: RuleMatchInfo -> SDoc # pprPrec :: Rational -> RuleMatchInfo -> SDoc #
Outputable Activation # |
Methods ppr :: Activation -> SDoc # pprPrec :: Rational -> Activation -> SDoc #
Outputable CompilerPhase # |
Methods ppr :: CompilerPhase -> SDoc # pprPrec :: Rational -> CompilerPhase -> SDoc #
Outputable SuccessFlag # |
Methods ppr :: SuccessFlag -> SDoc # pprPrec :: Rational -> SuccessFlag -> SDoc #
Outputable OccInfo # |
Methods ppr :: OccInfo -> SDoc # pprPrec :: Rational -> OccInfo -> SDoc #
Outputable OverlapMode # |
Methods ppr :: OverlapMode -> SDoc # pprPrec :: Rational -> OverlapMode -> SDoc #
Outputable OverlapFlag # |
Methods ppr :: OverlapFlag -> SDoc # pprPrec :: Rational -> OverlapFlag -> SDoc #
Outputable Origin # |
Methods ppr :: Origin -> SDoc # pprPrec :: Rational -> Origin -> SDoc #
Outputable RecFlag # |
Methods ppr :: RecFlag -> SDoc # pprPrec :: Rational -> RecFlag -> SDoc #
Outputable Boxity # |
Methods ppr :: Boxity -> SDoc # pprPrec :: Rational -> Boxity -> SDoc #
Outputable TopLevelFlag # |
Methods ppr :: TopLevelFlag -> SDoc # pprPrec :: Rational -> TopLevelFlag -> SDoc #
Outputable FixityDirection # |
Methods ppr :: FixityDirection -> SDoc # pprPrec :: Rational -> FixityDirection -> SDoc #
Outputable Fixity # |
Methods ppr :: Fixity -> SDoc # pprPrec :: Rational -> Fixity -> SDoc #
Outputable WarningTxt # |
Methods ppr :: WarningTxt -> SDoc # pprPrec :: Rational -> WarningTxt -> SDoc #
Outputable FunctionOrData # |
Methods ppr :: FunctionOrData -> SDoc # pprPrec :: Rational -> FunctionOrData -> SDoc #
Outputable SwapFlag # |
Methods ppr :: SwapFlag -> SDoc # pprPrec :: Rational -> SwapFlag -> SDoc #
Outputable OneShotInfo # |
Methods ppr :: OneShotInfo -> SDoc # pprPrec :: Rational -> OneShotInfo -> SDoc #
Outputable Unique # |
Methods ppr :: Unique -> SDoc # pprPrec :: Rational -> Unique -> SDoc #
Outputable RegClass # |
Methods ppr :: RegClass -> SDoc # pprPrec :: Rational -> RegClass -> SDoc #
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.
Methods ppr :: Reg -> SDoc # pprPrec :: Rational -> Reg -> SDoc #
Outputable RealReg # |
Methods ppr :: RealReg -> SDoc # pprPrec :: Rational -> RealReg -> SDoc #
Outputable VirtualReg # |
Methods ppr :: VirtualReg -> SDoc # pprPrec :: Rational -> VirtualReg -> SDoc #
Outputable ModLocation # |
Methods ppr :: ModLocation -> SDoc # pprPrec :: Rational -> ModLocation -> SDoc #
Outputable PackageName # |
Methods ppr :: PackageName -> SDoc # pprPrec :: Rational -> PackageName -> SDoc #
Outputable SourcePackageId # |
Methods ppr :: SourcePackageId -> SDoc # pprPrec :: Rational -> SourcePackageId -> SDoc #
Outputable ComponentId # |
Methods ppr :: ComponentId -> SDoc # pprPrec :: Rational -> ComponentId -> SDoc #
Outputable Phase # |
Methods ppr :: Phase -> SDoc # pprPrec :: Rational -> Phase -> SDoc #
Outputable GhcMode # |
Methods ppr :: GhcMode -> SDoc # pprPrec :: Rational -> GhcMode -> SDoc #
Outputable SafeHaskellMode # |
Methods ppr :: SafeHaskellMode -> SDoc # pprPrec :: Rational -> SafeHaskellMode -> SDoc #
Outputable Annotation # |
Methods ppr :: Annotation -> SDoc # pprPrec :: Rational -> Annotation -> SDoc #
Outputable TyCon # |
Methods ppr :: TyCon -> SDoc # pprPrec :: Rational -> TyCon -> SDoc #
Outputable Var # |
Methods ppr :: Var -> SDoc # pprPrec :: Rational -> Var -> SDoc #
Outputable EqSpec # |
Methods ppr :: EqSpec -> SDoc # pprPrec :: Rational -> EqSpec -> SDoc #
Outputable DataCon # |
Methods ppr :: DataCon -> SDoc # pprPrec :: Rational -> DataCon -> SDoc #
Outputable PatSyn # |
Methods ppr :: PatSyn -> SDoc # pprPrec :: Rational -> PatSyn -> SDoc #
Outputable ConLike # |
Methods ppr :: ConLike -> SDoc # pprPrec :: Rational -> ConLike -> SDoc #
Outputable InScopeSet # |
Methods ppr :: InScopeSet -> SDoc # pprPrec :: Rational -> InScopeSet -> SDoc #
Outputable Width # |
Methods ppr :: Width -> SDoc # pprPrec :: Rational -> Width -> SDoc #
Outputable CmmType # |
Methods ppr :: CmmType -> SDoc # pprPrec :: Rational -> CmmType -> SDoc #
Outputable ArgDescr # |
Methods ppr :: ArgDescr -> SDoc # pprPrec :: Rational -> ArgDescr -> SDoc #
Outputable ClosureTypeInfo # |
Methods ppr :: ClosureTypeInfo -> SDoc # pprPrec :: Rational -> ClosureTypeInfo -> SDoc #
Outputable SMRep # |
Methods ppr :: SMRep -> SDoc # pprPrec :: Rational -> SMRep -> SDoc #
Outputable StgHalfWord # |
Methods ppr :: StgHalfWord -> SDoc # pprPrec :: Rational -> StgHalfWord -> SDoc #
Outputable StgWord # |
Methods ppr :: StgWord -> SDoc # pprPrec :: Rational -> StgWord -> SDoc #
Outputable ModuleOrigin # |
Methods ppr :: ModuleOrigin -> SDoc # pprPrec :: Rational -> ModuleOrigin -> SDoc #
Outputable CType # |
Methods ppr :: CType -> SDoc # pprPrec :: Rational -> CType -> SDoc #
Outputable Header # |
Methods ppr :: Header -> SDoc # pprPrec :: Rational -> Header -> SDoc #
Outputable CCallConv # |
Methods ppr :: CCallConv -> SDoc # pprPrec :: Rational -> CCallConv -> SDoc #
Outputable CCallSpec # |
Methods ppr :: CCallSpec -> SDoc # pprPrec :: Rational -> CCallSpec -> SDoc #
Outputable CExportSpec # |
Methods ppr :: CExportSpec -> SDoc # pprPrec :: Rational -> CExportSpec -> SDoc #
Outputable Safety # |
Methods ppr :: Safety -> SDoc # pprPrec :: Rational -> Safety -> SDoc #
Outputable ForeignCall # |
Methods ppr :: ForeignCall -> SDoc # pprPrec :: Rational -> ForeignCall -> SDoc #
Outputable CostCentreStack # |
Methods ppr :: CostCentreStack -> SDoc # pprPrec :: Rational -> CostCentreStack -> SDoc #
Outputable CostCentre # |
Methods ppr :: CostCentre -> SDoc # pprPrec :: Rational -> CostCentre -> SDoc #
Outputable CoAxiomRule # |
Methods ppr :: CoAxiomRule -> SDoc # pprPrec :: Rational -> CoAxiomRule -> SDoc #
Outputable Role # |
Methods ppr :: Role -> SDoc # pprPrec :: Rational -> Role -> SDoc #
Outputable CoAxBranch # |
Methods ppr :: CoAxBranch -> SDoc # pprPrec :: Rational -> CoAxBranch -> SDoc #
Outputable LiftingContext # |
Methods ppr :: LiftingContext -> SDoc # pprPrec :: Rational -> LiftingContext -> SDoc #
Outputable AvailInfo # |
Methods ppr :: AvailInfo -> SDoc # pprPrec :: Rational -> AvailInfo -> SDoc #
Outputable ImportSpec # |
Methods ppr :: ImportSpec -> SDoc # pprPrec :: Rational -> ImportSpec -> SDoc #
Outputable Parent # |
Methods ppr :: Parent -> SDoc # pprPrec :: Rational -> Parent -> SDoc #
Outputable GlobalRdrElt # |
Methods ppr :: GlobalRdrElt -> SDoc # pprPrec :: Rational -> GlobalRdrElt -> SDoc #
Outputable LocalRdrEnv # |
Methods ppr :: LocalRdrEnv -> SDoc # pprPrec :: Rational -> LocalRdrEnv -> SDoc #
Outputable RdrName # |
Methods ppr :: RdrName -> SDoc # pprPrec :: Rational -> RdrName -> SDoc #
Outputable AnnotationComment # |
Methods ppr :: AnnotationComment -> SDoc # pprPrec :: Rational -> AnnotationComment -> SDoc #
Outputable AnnKeywordId # |
Methods ppr :: AnnKeywordId -> SDoc # pprPrec :: Rational -> AnnKeywordId -> SDoc #
Outputable Token # |
Methods ppr :: Token -> SDoc # pprPrec :: Rational -> Token -> SDoc #
Outputable Class # |
Methods ppr :: Class -> SDoc # pprPrec :: Rational -> Class -> SDoc #
Outputable PrimElemRep # |
Methods ppr :: PrimElemRep -> SDoc # pprPrec :: Rational -> PrimElemRep -> SDoc #
Outputable PrimRep # |
Methods ppr :: PrimRep -> SDoc # pprPrec :: Rational -> PrimRep -> SDoc #
Outputable AlgTyConFlav # |
Methods ppr :: AlgTyConFlav -> SDoc # pprPrec :: Rational -> AlgTyConFlav -> SDoc #
Outputable CoercionHole # |
Methods ppr :: CoercionHole -> SDoc # pprPrec :: Rational -> CoercionHole -> SDoc #
Outputable VisibilityFlag # |
Methods ppr :: VisibilityFlag -> SDoc # pprPrec :: Rational -> VisibilityFlag -> SDoc #
Outputable EqRel # |
Methods ppr :: EqRel -> SDoc # pprPrec :: Rational -> EqRel -> SDoc #
Outputable RepType # |
Methods ppr :: RepType -> SDoc # pprPrec :: Rational -> RepType -> SDoc #
Outputable Literal # |
Methods ppr :: Literal -> SDoc # pprPrec :: Rational -> Literal -> SDoc #
Outputable StrictnessMark # |
Methods ppr :: StrictnessMark -> SDoc # pprPrec :: Rational -> StrictnessMark -> SDoc #
Outputable SrcUnpackedness # |
Methods ppr :: SrcUnpackedness -> SDoc # pprPrec :: Rational -> SrcUnpackedness -> SDoc #
Outputable SrcStrictness # |
Methods ppr :: SrcStrictness -> SDoc # pprPrec :: Rational -> SrcStrictness -> SDoc #
Outputable HsImplBang # |
Methods ppr :: HsImplBang -> SDoc # pprPrec :: Rational -> HsImplBang -> SDoc #
Outputable HsSrcBang # |
Methods ppr :: HsSrcBang -> SDoc # pprPrec :: Rational -> HsSrcBang -> SDoc #
Outputable StrictSig # |
Methods ppr :: StrictSig -> SDoc # pprPrec :: Rational -> StrictSig -> SDoc #
Outputable DmdType # |
Methods ppr :: DmdType -> SDoc # pprPrec :: Rational -> DmdType -> SDoc #
Outputable CPRResult # |
Methods ppr :: CPRResult -> SDoc # pprPrec :: Rational -> CPRResult -> SDoc #
Outputable TypeShape # |
Methods ppr :: TypeShape -> SDoc # pprPrec :: Rational -> TypeShape -> SDoc #
Outputable Count # |
Methods ppr :: Count -> SDoc # pprPrec :: Rational -> Count -> SDoc #
Outputable UseDmd # |
Methods ppr :: UseDmd -> SDoc # pprPrec :: Rational -> UseDmd -> SDoc #
Outputable StrDmd # |
Methods ppr :: StrDmd -> SDoc # pprPrec :: Rational -> StrDmd -> SDoc #
Outputable AltCon # |
Methods ppr :: AltCon -> SDoc # pprPrec :: Rational -> AltCon -> SDoc #
Outputable TickBoxOp # |
Methods ppr :: TickBoxOp -> SDoc # pprPrec :: Rational -> TickBoxOp -> SDoc #
Outputable CafInfo # |
Methods ppr :: CafInfo -> SDoc # pprPrec :: Rational -> CafInfo -> SDoc #
Outputable RecSelParent # |
Methods ppr :: RecSelParent -> SDoc # pprPrec :: Rational -> RecSelParent -> SDoc #
Outputable UnVarGraph # |
Methods ppr :: UnVarGraph -> SDoc # pprPrec :: Rational -> UnVarGraph -> SDoc #
Outputable UnVarSet # |
Methods ppr :: UnVarSet -> SDoc # pprPrec :: Rational -> UnVarSet -> SDoc #
Outputable CoreStats # |
Methods ppr :: CoreStats -> SDoc # pprPrec :: Rational -> CoreStats -> SDoc #
Outputable FamInstMatch # |
Methods ppr :: FamInstMatch -> SDoc # pprPrec :: Rational -> FamInstMatch -> SDoc #
Outputable FamInst # |
Methods ppr :: FamInst -> SDoc # pprPrec :: Rational -> FamInst -> SDoc #
Outputable PrimCall # |
Methods ppr :: PrimCall -> SDoc # pprPrec :: Rational -> PrimCall -> SDoc #
Outputable ForeignLabelSource # |
Methods ppr :: ForeignLabelSource -> SDoc # pprPrec :: Rational -> ForeignLabelSource -> SDoc #
Outputable CLabel # |
Methods ppr :: CLabel -> SDoc # pprPrec :: Rational -> CLabel -> SDoc #
Outputable CmmTickScope # |
Methods ppr :: CmmTickScope -> SDoc # pprPrec :: Rational -> CmmTickScope -> SDoc #
Outputable UnwindExpr # |
Methods ppr :: UnwindExpr -> SDoc # pprPrec :: Rational -> UnwindExpr -> SDoc #
Outputable DebugBlock # |
Methods ppr :: DebugBlock -> SDoc # pprPrec :: Rational -> DebugBlock -> SDoc #
Outputable LlvmCastOp # |
Methods ppr :: LlvmCastOp -> SDoc # pprPrec :: Rational -> LlvmCastOp -> SDoc #
Outputable LlvmCmpOp # |
Methods ppr :: LlvmCmpOp -> SDoc # pprPrec :: Rational -> LlvmCmpOp -> SDoc #
Outputable LlvmMachOp # |
Methods ppr :: LlvmMachOp -> SDoc # pprPrec :: Rational -> LlvmMachOp -> SDoc #
Outputable LlvmLinkageType # |
Methods ppr :: LlvmLinkageType -> SDoc # pprPrec :: Rational -> LlvmLinkageType -> SDoc #
Outputable LlvmCallConvention # |
Methods ppr :: LlvmCallConvention -> SDoc # pprPrec :: Rational -> LlvmCallConvention -> SDoc #
Outputable LlvmFuncAttr # |
Methods ppr :: LlvmFuncAttr -> SDoc # pprPrec :: Rational -> LlvmFuncAttr -> SDoc #
Outputable LlvmParamAttr # |
Methods ppr :: LlvmParamAttr -> SDoc # pprPrec :: Rational -> LlvmParamAttr -> SDoc #
Outputable LlvmFunctionDecl # |
Methods ppr :: LlvmFunctionDecl -> SDoc # pprPrec :: Rational -> LlvmFunctionDecl -> SDoc #
Outputable LlvmStatic # |
Methods ppr :: LlvmStatic -> SDoc # pprPrec :: Rational -> LlvmStatic -> SDoc #
Outputable LlvmLit # |
Methods ppr :: LlvmLit -> SDoc # pprPrec :: Rational -> LlvmLit -> SDoc #
Outputable LlvmVar # |
Methods ppr :: LlvmVar -> SDoc # pprPrec :: Rational -> LlvmVar -> SDoc #
Outputable LlvmType # |
Methods ppr :: LlvmType -> SDoc # pprPrec :: Rational -> LlvmType -> SDoc #
Outputable MetaExpr # |
Methods ppr :: MetaExpr -> SDoc # pprPrec :: Rational -> MetaExpr -> SDoc #
Outputable TopSRT # |
Methods ppr :: TopSRT -> SDoc # pprPrec :: Rational -> TopSRT -> SDoc #
Outputable ParamLocation # |
Methods ppr :: ParamLocation -> SDoc # pprPrec :: Rational -> ParamLocation -> SDoc #
Outputable Status # |
Methods ppr :: Status -> SDoc # pprPrec :: Rational -> Status -> SDoc #
Outputable LiveInfo # |
Methods ppr :: LiveInfo -> SDoc # pprPrec :: Rational -> LiveInfo -> SDoc #
Outputable SpillStats # |
Methods ppr :: SpillStats -> SDoc # pprPrec :: Rational -> SpillStats -> SDoc #
Outputable Loc # |
Methods ppr :: Loc -> SDoc # pprPrec :: Rational -> Loc -> SDoc #
Outputable UpdateFlag # |
Methods ppr :: UpdateFlag -> SDoc # pprPrec :: Rational -> UpdateFlag -> SDoc #
Outputable AltType # |
Methods ppr :: AltType -> SDoc # pprPrec :: Rational -> AltType -> SDoc #
Outputable CgBreakInfo # |
Methods ppr :: CgBreakInfo -> SDoc # pprPrec :: Rational -> CgBreakInfo -> SDoc #
Outputable UnlinkedBCO # |
Methods ppr :: UnlinkedBCO -> SDoc # pprPrec :: Rational -> UnlinkedBCO -> SDoc #
Outputable CompiledByteCode # |
Methods ppr :: CompiledByteCode -> SDoc # pprPrec :: Rational -> CompiledByteCode -> SDoc #
Outputable TcLevel # |
Methods ppr :: TcLevel -> SDoc # pprPrec :: Rational -> TcLevel -> SDoc #
Outputable ExpType # |
Methods ppr :: ExpType -> SDoc # pprPrec :: Rational -> ExpType -> SDoc #
Outputable CgLoc # |
Methods ppr :: CgLoc -> SDoc # pprPrec :: Rational -> CgLoc -> SDoc #
Outputable ArgRep # |
Methods ppr :: ArgRep -> SDoc # pprPrec :: Rational -> ArgRep -> SDoc #
Outputable Sequel # |
Methods ppr :: Sequel -> SDoc # pprPrec :: Rational -> Sequel -> SDoc #
Outputable CgIdInfo # |
Methods ppr :: CgIdInfo -> SDoc # pprPrec :: Rational -> CgIdInfo -> SDoc #
Outputable BCInstr # |
Methods ppr :: BCInstr -> SDoc # pprPrec :: Rational -> BCInstr -> SDoc #
Outputable IfaceCoercion # |
Methods ppr :: IfaceCoercion -> SDoc # pprPrec :: Rational -> IfaceCoercion -> SDoc #
Outputable IfaceTyCon # |
Methods ppr :: IfaceTyCon -> SDoc # pprPrec :: Rational -> IfaceTyCon -> SDoc #
Outputable IfaceTcArgs # |
Methods ppr :: IfaceTcArgs -> SDoc # pprPrec :: Rational -> IfaceTcArgs -> SDoc #
Outputable IfaceForAllBndr # |
Methods ppr :: IfaceForAllBndr -> SDoc # pprPrec :: Rational -> IfaceForAllBndr -> SDoc #
Outputable IfaceTyLit # |
Methods ppr :: IfaceTyLit -> SDoc # pprPrec :: Rational -> IfaceTyLit -> SDoc #
Outputable IfaceType # |
Methods ppr :: IfaceType -> SDoc # pprPrec :: Rational -> IfaceType -> SDoc #
Outputable IfaceBndr # |
Methods ppr :: IfaceBndr -> SDoc # pprPrec :: Rational -> IfaceBndr -> SDoc #
Outputable IfaceConAlt # |
Methods ppr :: IfaceConAlt -> SDoc # pprPrec :: Rational -> IfaceConAlt -> SDoc #
Outputable IfaceExpr # |
Methods ppr :: IfaceExpr -> SDoc # pprPrec :: Rational -> IfaceExpr -> SDoc #
Outputable IfaceIdDetails # |
Methods ppr :: IfaceIdDetails -> SDoc # pprPrec :: Rational -> IfaceIdDetails -> SDoc #
Outputable IfaceUnfolding # |
Methods ppr :: IfaceUnfolding -> SDoc # pprPrec :: Rational -> IfaceUnfolding -> SDoc #
Outputable IfaceInfoItem # |
Methods ppr :: IfaceInfoItem -> SDoc # pprPrec :: Rational -> IfaceInfoItem -> SDoc #
Outputable IfaceIdInfo # |
Methods ppr :: IfaceIdInfo -> SDoc # pprPrec :: Rational -> IfaceIdInfo -> SDoc #
Outputable IfaceAnnotation # |
Methods ppr :: IfaceAnnotation -> SDoc # pprPrec :: Rational -> IfaceAnnotation -> SDoc #
Outputable IfaceRule # |
Methods ppr :: IfaceRule -> SDoc # pprPrec :: Rational -> IfaceRule -> SDoc #
Outputable IfaceFamInst # |
Methods ppr :: IfaceFamInst -> SDoc # pprPrec :: Rational -> IfaceFamInst -> SDoc #
Outputable IfaceClsInst # |
Methods ppr :: IfaceClsInst -> SDoc # pprPrec :: Rational -> IfaceClsInst -> SDoc #
Outputable IfaceAT # |
Methods ppr :: IfaceAT -> SDoc # pprPrec :: Rational -> IfaceAT -> SDoc #
Outputable IfaceClassOp # |
Methods ppr :: IfaceClassOp -> SDoc # pprPrec :: Rational -> IfaceClassOp -> SDoc #
Outputable IfaceTyConParent # |
Methods ppr :: IfaceTyConParent -> SDoc # pprPrec :: Rational -> IfaceTyConParent -> SDoc #
Outputable IfaceDecl # |
Methods ppr :: IfaceDecl -> SDoc # pprPrec :: Rational -> IfaceDecl -> SDoc #
Outputable EvCallStack # |
Methods ppr :: EvCallStack -> SDoc # pprPrec :: Rational -> EvCallStack -> SDoc #
Outputable EvLit # |
Methods ppr :: EvLit -> SDoc # pprPrec :: Rational -> EvLit -> SDoc #
Outputable EvTypeable # |
Methods ppr :: EvTypeable -> SDoc # pprPrec :: Rational -> EvTypeable -> SDoc #
Outputable EvTerm # |
Methods ppr :: EvTerm -> SDoc # pprPrec :: Rational -> EvTerm -> SDoc #
Outputable EvBind # |
Methods ppr :: EvBind -> SDoc # pprPrec :: Rational -> EvBind -> SDoc #
Outputable EvBindsVar # |
Methods ppr :: EvBindsVar -> SDoc # pprPrec :: Rational -> EvBindsVar -> SDoc #
Outputable TcEvBinds # |
Methods ppr :: TcEvBinds -> SDoc # pprPrec :: Rational -> TcEvBinds -> SDoc #
Outputable HsWrapper # |
Methods ppr :: HsWrapper -> SDoc # pprPrec :: Rational -> HsWrapper -> SDoc #
Outputable OverLitVal # |
Methods ppr :: OverLitVal -> SDoc # pprPrec :: Rational -> OverLitVal -> SDoc #
Outputable HsLit # |
Methods ppr :: HsLit -> SDoc # pprPrec :: Rational -> HsLit -> SDoc #
Outputable HsTyLit # |
Methods ppr :: HsTyLit -> SDoc # pprPrec :: Rational -> HsTyLit -> SDoc #
Outputable HsIPName # |
Methods ppr :: HsIPName -> SDoc # pprPrec :: Rational -> HsIPName -> SDoc #
Outputable TcSpecPrag # |
Methods ppr :: TcSpecPrag -> SDoc # pprPrec :: Rational -> TcSpecPrag -> SDoc #
Outputable ClsInst # |
Methods ppr :: ClsInst -> SDoc # pprPrec :: Rational -> ClsInst -> SDoc #
Outputable DocDecl # |
Methods ppr :: DocDecl -> SDoc # pprPrec :: Rational -> DocDecl -> SDoc #
Outputable ForeignExport # |
Methods ppr :: ForeignExport -> SDoc # pprPrec :: Rational -> ForeignExport -> SDoc #
Outputable ForeignImport # |
Methods ppr :: ForeignImport -> SDoc # pprPrec :: Rational -> ForeignImport -> SDoc #
Outputable NewOrData # |
Methods ppr :: NewOrData -> SDoc # pprPrec :: Rational -> NewOrData -> SDoc #
Outputable PendingTcSplice # |
Methods ppr :: PendingTcSplice -> SDoc # pprPrec :: Rational -> PendingTcSplice -> SDoc #
Outputable PendingRnSplice # |
Methods ppr :: PendingRnSplice -> SDoc # pprPrec :: Rational -> PendingRnSplice -> SDoc #
Outputable UnboundVar # |
Methods ppr :: UnboundVar -> SDoc # pprPrec :: Rational -> UnboundVar -> SDoc #
Outputable PmLit # |
Methods ppr :: PmLit -> SDoc # pprPrec :: Rational -> PmLit -> SDoc #
Outputable PmExpr # |
Methods ppr :: PmExpr -> SDoc # pprPrec :: Rational -> PmExpr -> SDoc #
Outputable Subst # |
Methods ppr :: Subst -> SDoc # pprPrec :: Rational -> Subst -> SDoc #
Outputable CallCtxt # |
Methods ppr :: CallCtxt -> SDoc # pprPrec :: Rational -> CallCtxt -> SDoc #
Outputable ArgSummary # |
Methods ppr :: ArgSummary -> SDoc # pprPrec :: Rational -> ArgSummary -> SDoc #
Outputable Unlinked # |
Methods ppr :: Unlinked -> SDoc # pprPrec :: Rational -> Unlinked -> SDoc #
Outputable Linkable # |
Methods ppr :: Linkable -> SDoc # pprPrec :: Rational -> Linkable -> SDoc #
Outputable IfaceTrustInfo # |
Methods ppr :: IfaceTrustInfo -> SDoc # pprPrec :: Rational -> IfaceTrustInfo -> SDoc #
Outputable IfaceVectInfo # |
Methods ppr :: IfaceVectInfo -> SDoc # pprPrec :: Rational -> IfaceVectInfo -> SDoc #
Outputable VectInfo # |
Methods ppr :: VectInfo -> SDoc # pprPrec :: Rational -> VectInfo -> SDoc #
Outputable ModSummary # |
Methods ppr :: ModSummary -> SDoc # pprPrec :: Rational -> ModSummary -> SDoc #
Outputable FixItem # |
Methods ppr :: FixItem -> SDoc # pprPrec :: Rational -> FixItem -> SDoc #
Outputable InteractiveImport # |
Methods ppr :: InteractiveImport -> SDoc # pprPrec :: Rational -> InteractiveImport -> SDoc #
Outputable TargetId # |
Methods ppr :: TargetId -> SDoc # pprPrec :: Rational -> TargetId -> SDoc #
Outputable Target # |
Methods ppr :: Target -> SDoc # pprPrec :: Rational -> Target -> SDoc #
Outputable FloatBind # |
Methods ppr :: FloatBind -> SDoc # pprPrec :: Rational -> FloatBind -> SDoc #
Outputable PhasePlus # |
Methods ppr :: PhasePlus -> SDoc # pprPrec :: Rational -> PhasePlus -> SDoc #
Outputable TypeOrKind # |
Methods ppr :: TypeOrKind -> SDoc # pprPrec :: Rational -> TypeOrKind -> SDoc #
Outputable ErrorThing # |
Methods ppr :: ErrorThing -> SDoc # pprPrec :: Rational -> ErrorThing -> SDoc #
Outputable CtOrigin # |
Methods ppr :: CtOrigin -> SDoc # pprPrec :: Rational -> CtOrigin -> SDoc #
Outputable SkolemInfo # |
Methods ppr :: SkolemInfo -> SDoc # pprPrec :: Rational -> SkolemInfo -> SDoc #
Outputable SubGoalDepth # |
Methods ppr :: SubGoalDepth -> SDoc # pprPrec :: Rational -> SubGoalDepth -> SDoc #
Outputable CtFlavour # |
Methods ppr :: CtFlavour -> SDoc # pprPrec :: Rational -> CtFlavour -> SDoc #
Outputable CtEvidence # |
Methods ppr :: CtEvidence -> SDoc # pprPrec :: Rational -> CtEvidence -> SDoc #
Outputable TcEvDest # |
Methods ppr :: TcEvDest -> SDoc # pprPrec :: Rational -> TcEvDest -> SDoc #
Outputable ImplicStatus # |
Methods ppr :: ImplicStatus -> SDoc # pprPrec :: Rational -> ImplicStatus -> SDoc #
Outputable Implication # |
Methods ppr :: Implication -> SDoc # pprPrec :: Rational -> Implication -> SDoc #
Outputable WantedConstraints # |
Methods ppr :: WantedConstraints -> SDoc # pprPrec :: Rational -> WantedConstraints -> SDoc #
Outputable Ct # |
Methods ppr :: Ct -> SDoc # pprPrec :: Rational -> Ct -> SDoc #
Outputable TcPatSynInfo # |
Methods ppr :: TcPatSynInfo -> SDoc # pprPrec :: Rational -> TcPatSynInfo -> SDoc #
Outputable TcIdSigBndr # |
Methods ppr :: TcIdSigBndr -> SDoc # pprPrec :: Rational -> TcIdSigBndr -> SDoc #
Outputable TcIdSigInfo # |
Methods ppr :: TcIdSigInfo -> SDoc # pprPrec :: Rational -> TcIdSigInfo -> SDoc #
Outputable TcSigInfo # |
Methods ppr :: TcSigInfo -> SDoc # pprPrec :: Rational -> TcSigInfo -> SDoc #
Outputable WhereFrom # |
Methods ppr :: WhereFrom -> SDoc # pprPrec :: Rational -> WhereFrom -> SDoc #
Outputable PromotionErr # |
Methods ppr :: PromotionErr -> SDoc # pprPrec :: Rational -> PromotionErr -> SDoc #
Outputable TcTyThing # |
Methods ppr :: TcTyThing -> SDoc # pprPrec :: Rational -> TcTyThing -> SDoc #
Outputable ThStage # |
Methods ppr :: ThStage -> SDoc # pprPrec :: Rational -> ThStage -> SDoc #
Outputable TcIdBinder # |
Methods ppr :: TcIdBinder -> SDoc # pprPrec :: Rational -> TcIdBinder -> SDoc #
Outputable InertCans # |
Methods ppr :: InertCans -> SDoc # pprPrec :: Rational -> InertCans -> SDoc #
Outputable InertSet # |
Methods ppr :: InertSet -> SDoc # pprPrec :: Rational -> InertSet -> SDoc #
Outputable WorkList # |
Methods ppr :: WorkList -> SDoc # pprPrec :: Rational -> WorkList -> SDoc #
Outputable Tick # |
Methods ppr :: Tick -> SDoc # pprPrec :: Rational -> Tick -> SDoc #
Outputable FloatOutSwitches # |
Methods ppr :: FloatOutSwitches -> SDoc # pprPrec :: Rational -> FloatOutSwitches -> SDoc #
Outputable SimplifierMode # |
Methods ppr :: SimplifierMode -> SDoc # pprPrec :: Rational -> SimplifierMode -> SDoc #
Outputable CoreToDo # |
Methods ppr :: CoreToDo -> SDoc # pprPrec :: Rational -> CoreToDo -> SDoc #
Outputable EquationInfo # |
Methods ppr :: EquationInfo -> SDoc # pprPrec :: Rational -> EquationInfo -> SDoc #
Outputable CompRepr # |
Methods ppr :: CompRepr -> SDoc # pprPrec :: Rational -> CompRepr -> SDoc #
Outputable ProdRepr # |
Methods ppr :: ProdRepr -> SDoc # pprPrec :: Rational -> ProdRepr -> SDoc #
Outputable ConRepr # |
Methods ppr :: ConRepr -> SDoc # pprPrec :: Rational -> ConRepr -> SDoc #
Outputable SumRepr # |
Methods ppr :: SumRepr -> SDoc # pprPrec :: Rational -> SumRepr -> SDoc #
Outputable FloatSpec # |
Methods ppr :: FloatSpec -> SDoc # pprPrec :: Rational -> FloatSpec -> SDoc #
Outputable Level # |
Methods ppr :: Level -> SDoc # pprPrec :: Rational -> Level -> SDoc #
Outputable Floats # |
Methods ppr :: Floats -> SDoc # pprPrec :: Rational -> Floats -> SDoc #
Outputable SimplSR # |
Methods ppr :: SimplSR -> SDoc # pprPrec :: Rational -> SimplSR -> SDoc #
Outputable ArgSpec # |
Methods ppr :: ArgSpec -> SDoc # pprPrec :: Rational -> ArgSpec -> SDoc #
Outputable DupFlag # |
Methods ppr :: DupFlag -> SDoc # pprPrec :: Rational -> DupFlag -> SDoc #
Outputable SimplCont # |
Methods ppr :: SimplCont -> SDoc # pprPrec :: Rational -> SimplCont -> SDoc #
Outputable ClosureType # |
Methods ppr :: ClosureType -> SDoc # pprPrec :: Rational -> ClosureType -> SDoc #
Outputable Term # |
Methods ppr :: Term -> SDoc # pprPrec :: Rational -> Term -> SDoc #
Outputable CoreModule # |
Methods ppr :: CoreModule -> SDoc # pprPrec :: Rational -> CoreModule -> SDoc #
Outputable a => Outputable [a] # |
Methods ppr :: [a] -> SDoc # pprPrec :: Rational -> [a] -> SDoc #
Outputable a => Outputable (Maybe a) # |
Methods ppr :: Maybe a -> SDoc # pprPrec :: Rational -> Maybe a -> SDoc #
Outputable a => Outputable (SCC a) # |
Methods ppr :: SCC a -> SDoc # pprPrec :: Rational -> SCC a -> SDoc #
Outputable elt => Outputable (IntMap elt) # |
Methods ppr :: IntMap elt -> SDoc # pprPrec :: Rational -> IntMap elt -> SDoc #
Outputable a => Outputable (Set a) # |
Methods ppr :: Set a -> SDoc # pprPrec :: Rational -> Set a -> SDoc #
Outputable a => Outputable (Bag a) # |
Methods ppr :: Bag a -> SDoc # pprPrec :: Rational -> Bag a -> SDoc #
Outputable node => Outputable (Graph node) # |
Methods ppr :: Graph node -> SDoc # pprPrec :: Rational -> Graph node -> SDoc #
Outputable a => Outputable (OrdList a) # |
Methods ppr :: OrdList a -> SDoc # pprPrec :: Rational -> OrdList a -> SDoc #
Outputable a => Outputable (Pair a) # |
Methods ppr :: Pair a -> SDoc # pprPrec :: Rational -> Pair a -> SDoc #
Outputable (DefMethSpec ty) # |
Methods ppr :: DefMethSpec ty -> SDoc # pprPrec :: Rational -> DefMethSpec ty -> SDoc #
Outputable a => Outputable (UniqFM a) # |
Methods ppr :: UniqFM a -> SDoc # pprPrec :: Rational -> UniqFM a -> SDoc #
Outputable a => Outputable (UniqDFM a) # |
Methods ppr :: UniqDFM a -> SDoc # pprPrec :: Rational -> UniqDFM a -> SDoc #
Outputable a => Outputable (OccEnv a) # |
Methods ppr :: OccEnv a -> SDoc # pprPrec :: Rational -> OccEnv a -> SDoc #
Outputable a => Outputable (FieldLbl a) # |
Methods ppr :: FieldLbl a -> SDoc # pprPrec :: Rational -> FieldLbl a -> SDoc #
Outputable name => Outputable (AnnTarget name) # |
Methods ppr :: AnnTarget name -> SDoc # pprPrec :: Rational -> AnnTarget name -> SDoc #
(HasOccName name, OutputableBndr name) => Outputable (IE name) # |
Methods ppr :: IE name -> SDoc # pprPrec :: Rational -> IE name -> SDoc #
(OutputableBndr name, HasOccName name) => Outputable (ImportDecl name) # |
Methods ppr :: ImportDecl name -> SDoc # pprPrec :: Rational -> ImportDecl name -> SDoc #
Outputable (CoAxiom br) # |
Methods ppr :: CoAxiom br -> SDoc # pprPrec :: Rational -> CoAxiom br -> SDoc #
Outputable a => Outputable (BooleanFormula a) # |
Methods ppr :: BooleanFormula a -> SDoc # pprPrec :: Rational -> BooleanFormula a -> SDoc #
Outputable a => Outputable (UnifyResultM a) # |
Methods ppr :: UnifyResultM a -> SDoc # pprPrec :: Rational -> UnifyResultM a -> SDoc #
Outputable b => Outputable (TaggedBndr b) # |
Methods ppr :: TaggedBndr b -> SDoc # pprPrec :: Rational -> TaggedBndr b -> SDoc #
Outputable a => Outputable (CoreMap a) # |
Methods ppr :: CoreMap a -> SDoc # pprPrec :: Rational -> CoreMap a -> SDoc #
Outputable instr => Outputable (ListGraph instr) # |
Methods ppr :: ListGraph instr -> SDoc # pprPrec :: Rational -> ListGraph instr -> SDoc #
Outputable instr => Outputable (GenBasicBlock instr) # |
Methods ppr :: GenBasicBlock instr -> SDoc # pprPrec :: Rational -> GenBasicBlock instr -> SDoc #
Outputable instr => Outputable (LiveInstr instr) # |
Methods ppr :: LiveInstr instr -> SDoc # pprPrec :: Rational -> LiveInstr instr -> SDoc #
Outputable instr => Outputable (InstrSR instr) # |
Methods ppr :: InstrSR instr -> SDoc # pprPrec :: Rational -> InstrSR instr -> SDoc #
Outputable bdee => Outputable (GenStgArg bdee) # |
Methods ppr :: GenStgArg bdee -> SDoc # pprPrec :: Rational -> GenStgArg bdee -> SDoc #
Outputable a => Outputable (NonVoid a) # |
Methods ppr :: NonVoid a -> SDoc # pprPrec :: Rational -> NonVoid a -> SDoc #
Outputable a => Outputable (ProtoBCO a) # |
Methods ppr :: ProtoBCO a -> SDoc # pprPrec :: Rational -> ProtoBCO a -> SDoc #
OutputableBndr name => Outputable (Pat name) # |
Methods ppr :: Pat name -> SDoc # pprPrec :: Rational -> Pat name -> SDoc #
OutputableBndr id => Outputable (SyntaxExpr id) # |
Methods ppr :: SyntaxExpr id -> SDoc # pprPrec :: Rational -> SyntaxExpr id -> SDoc #
OutputableBndr id => Outputable (HsSplice id) # |
Methods ppr :: HsSplice id -> SDoc # pprPrec :: Rational -> HsSplice id -> SDoc #
OutputableBndr id => Outputable (HsCmd id) # |
Methods ppr :: HsCmd id -> SDoc # pprPrec :: Rational -> HsCmd id -> SDoc #
OutputableBndr id => Outputable (HsExpr id) # |
Methods ppr :: HsExpr id -> SDoc # pprPrec :: Rational -> HsExpr id -> SDoc #
OutputableBndr id => Outputable (HsOverLit id) # |
Methods ppr :: HsOverLit id -> SDoc # pprPrec :: Rational -> HsOverLit id -> SDoc #
Outputable (AmbiguousFieldOcc name) # |
Methods ppr :: AmbiguousFieldOcc name -> SDoc # pprPrec :: Rational -> AmbiguousFieldOcc name -> SDoc #
Outputable (FieldOcc name) # |
Methods ppr :: FieldOcc name -> SDoc # pprPrec :: Rational -> FieldOcc name -> SDoc #
OutputableBndr name => Outputable (ConDeclField name) # |
Methods ppr :: ConDeclField name -> SDoc # pprPrec :: Rational -> ConDeclField name -> SDoc #
OutputableBndr name => Outputable (HsAppType name) # |
Methods ppr :: HsAppType name -> SDoc # pprPrec :: Rational -> HsAppType name -> SDoc #
Outputable (HsWildCardInfo name) # |
Methods ppr :: HsWildCardInfo name -> SDoc # pprPrec :: Rational -> HsWildCardInfo name -> SDoc #
OutputableBndr name => Outputable (HsType name) # |
Methods ppr :: HsType name -> SDoc # pprPrec :: Rational -> HsType name -> SDoc #
OutputableBndr name => Outputable (HsTyVarBndr name) # |
Methods ppr :: HsTyVarBndr name -> SDoc # pprPrec :: Rational -> HsTyVarBndr name -> SDoc #
OutputableBndr name => Outputable (LHsQTyVars name) # |
Methods ppr :: LHsQTyVars name -> SDoc # pprPrec :: Rational -> LHsQTyVars name -> SDoc #
Outputable a => Outputable (RecordPatSynField a) # |
Methods ppr :: RecordPatSynField a -> SDoc # pprPrec :: Rational -> RecordPatSynField a -> SDoc #
OutputableBndr name => Outputable (FixitySig name) # |
Methods ppr :: FixitySig name -> SDoc # pprPrec :: Rational -> FixitySig name -> SDoc #
OutputableBndr name => Outputable (Sig name) # |
Methods ppr :: Sig name -> SDoc # pprPrec :: Rational -> Sig name -> SDoc #
OutputableBndr id => Outputable (IPBind id) # |
Methods ppr :: IPBind id -> SDoc # pprPrec :: Rational -> IPBind id -> SDoc #
OutputableBndr id => Outputable (HsIPBinds id) # |
Methods ppr :: HsIPBinds id -> SDoc # pprPrec :: Rational -> HsIPBinds id -> SDoc #
OutputableBndr id => Outputable (ABExport id) # |
Methods ppr :: ABExport id -> SDoc # pprPrec :: Rational -> ABExport id -> SDoc #
OutputableBndr name => Outputable (RoleAnnotDecl name) # |
Methods ppr :: RoleAnnotDecl name -> SDoc # pprPrec :: Rational -> RoleAnnotDecl name -> SDoc #
OutputableBndr name => Outputable (AnnDecl name) # |
Methods ppr :: AnnDecl name -> SDoc # pprPrec :: Rational -> AnnDecl name -> SDoc #
OutputableBndr name => Outputable (WarnDecl name) # |
Methods ppr :: WarnDecl name -> SDoc # pprPrec :: Rational -> WarnDecl name -> SDoc #
OutputableBndr name => Outputable (WarnDecls name) # |
Methods ppr :: WarnDecls name -> SDoc # pprPrec :: Rational -> WarnDecls name -> SDoc #
OutputableBndr name => Outputable (VectDecl name) # |
Methods ppr :: VectDecl name -> SDoc # pprPrec :: Rational -> VectDecl name -> SDoc #
OutputableBndr name => Outputable (RuleBndr name) # |
Methods ppr :: RuleBndr name -> SDoc # pprPrec :: Rational -> RuleBndr name -> SDoc #
OutputableBndr name => Outputable (RuleDecl name) # |
Methods ppr :: RuleDecl name -> SDoc # pprPrec :: Rational -> RuleDecl name -> SDoc #
OutputableBndr name => Outputable (RuleDecls name) # |
Methods ppr :: RuleDecls name -> SDoc # pprPrec :: Rational -> RuleDecls name -> SDoc #
OutputableBndr name => Outputable (ForeignDecl name) # |
Methods ppr :: ForeignDecl name -> SDoc # pprPrec :: Rational -> ForeignDecl name -> SDoc #
OutputableBndr name => Outputable (DefaultDecl name) # |
Methods ppr :: DefaultDecl name -> SDoc # pprPrec :: Rational -> DefaultDecl name -> SDoc #
OutputableBndr name => Outputable (DerivDecl name) # |
Methods ppr :: DerivDecl name -> SDoc # pprPrec :: Rational -> DerivDecl name -> SDoc #
OutputableBndr name => Outputable (InstDecl name) # |
Methods ppr :: InstDecl name -> SDoc # pprPrec :: Rational -> InstDecl name -> SDoc #
OutputableBndr name => Outputable (ClsInstDecl name) # |
Methods ppr :: ClsInstDecl name -> SDoc # pprPrec :: Rational -> ClsInstDecl name -> SDoc #
OutputableBndr name => Outputable (DataFamInstDecl name) # |
Methods ppr :: DataFamInstDecl name -> SDoc # pprPrec :: Rational -> DataFamInstDecl name -> SDoc #
OutputableBndr name => Outputable (TyFamInstDecl name) # |
Methods ppr :: TyFamInstDecl name -> SDoc # pprPrec :: Rational -> TyFamInstDecl name -> SDoc #
OutputableBndr name => Outputable (ConDecl name) # |
Methods ppr :: ConDecl name -> SDoc # pprPrec :: Rational -> ConDecl name -> SDoc #
OutputableBndr name => Outputable (HsDataDefn name) # |
Methods ppr :: HsDataDefn name -> SDoc # pprPrec :: Rational -> HsDataDefn name -> SDoc #
Outputable (FamilyInfo name) # |
Methods ppr :: FamilyInfo name -> SDoc # pprPrec :: Rational -> FamilyInfo name -> SDoc #
OutputableBndr name => Outputable (FamilyDecl name) # |
Methods ppr :: FamilyDecl name -> SDoc # pprPrec :: Rational -> FamilyDecl name -> SDoc #
OutputableBndr name => Outputable (TyClGroup name) # |
Methods ppr :: TyClGroup name -> SDoc # pprPrec :: Rational -> TyClGroup name -> SDoc #
OutputableBndr name => Outputable (TyClDecl name) # |
Methods ppr :: TyClDecl name -> SDoc # pprPrec :: Rational -> TyClDecl name -> SDoc #
OutputableBndr name => Outputable (SpliceDecl name) # |
Methods ppr :: SpliceDecl name -> SDoc # pprPrec :: Rational -> SpliceDecl name -> SDoc #
OutputableBndr name => Outputable (HsGroup name) # |
Methods ppr :: HsGroup name -> SDoc # pprPrec :: Rational -> HsGroup name -> SDoc #
OutputableBndr name => Outputable (HsDecl name) # |
Methods ppr :: HsDecl name -> SDoc # pprPrec :: Rational -> HsDecl name -> SDoc #
OutputableBndr id => Outputable (ArithSeqInfo id) # |
Methods ppr :: ArithSeqInfo id -> SDoc # pprPrec :: Rational -> ArithSeqInfo id -> SDoc #
OutputableBndr id => Outputable (HsBracket id) # |
Methods ppr :: HsBracket id -> SDoc # pprPrec :: Rational -> HsBracket id -> SDoc #
OutputableBndr id => Outputable (HsCmdTop id) # |
Methods ppr :: HsCmdTop id -> SDoc # pprPrec :: Rational -> HsCmdTop id -> SDoc #
(OutputableBndr name, HasOccName name) => Outputable (HsModule name) # |
Methods ppr :: HsModule name -> SDoc # pprPrec :: Rational -> HsModule name -> SDoc #
OutputableBndr a => Outputable (InstInfo a) # |
Methods ppr :: InstInfo a -> SDoc # pprPrec :: Rational -> InstInfo a -> SDoc #
Outputable a => Outputable (StopOrContinue a) # |
Methods ppr :: StopOrContinue a -> SDoc # pprPrec :: Rational -> StopOrContinue a -> SDoc #
(Outputable a, Outputable b) => Outputable (Either a b) # |
Methods ppr :: Either a b -> SDoc # pprPrec :: Rational -> Either a b -> SDoc #
(Outputable a, Outputable b) => Outputable (a, b) # |
Methods ppr :: (a, b) -> SDoc # pprPrec :: Rational -> (a, b) -> SDoc #
(Outputable key, Outputable elt) => Outputable (Map key elt) # |
Methods ppr :: Map key elt -> SDoc # pprPrec :: Rational -> Map key elt -> SDoc #
(Outputable l, Outputable e) => Outputable (GenLocated l e) # |
Methods ppr :: GenLocated l e -> SDoc # pprPrec :: Rational -> GenLocated l e -> SDoc #
(Outputable statics, Outputable instr) => Outputable (RegAllocStats statics instr) # |
Methods ppr :: RegAllocStats statics instr -> SDoc # pprPrec :: Rational -> RegAllocStats statics instr -> SDoc #
(OutputableBndr bndr, Outputable bdee, Ord bdee) => Outputable (GenStgRhs bndr bdee) # |
Methods ppr :: GenStgRhs bndr bdee -> SDoc # pprPrec :: Rational -> GenStgRhs bndr bdee -> SDoc #
(OutputableBndr bndr, Outputable bdee, Ord bdee) => Outputable (GenStgExpr bndr bdee) # |
Methods ppr :: GenStgExpr bndr bdee -> SDoc # pprPrec :: Rational -> GenStgExpr bndr bdee -> SDoc #
(OutputableBndr bndr, Outputable bdee, Ord bdee) => Outputable (GenStgBinding bndr bdee) # |
Methods ppr :: GenStgBinding bndr bdee -> SDoc # pprPrec :: Rational -> GenStgBinding bndr bdee -> SDoc #
(Outputable arg, Outputable rec) => Outputable (HsConDetails arg rec) # |
Methods ppr :: HsConDetails arg rec -> SDoc # pprPrec :: Rational -> HsConDetails arg rec -> SDoc #
Outputable thing => Outputable (HsWildCardBndrs name thing) # |
Methods ppr :: HsWildCardBndrs name thing -> SDoc # pprPrec :: Rational -> HsWildCardBndrs name thing -> SDoc #
Outputable thing => Outputable (HsImplicitBndrs name thing) # |
Methods ppr :: HsImplicitBndrs name thing -> SDoc # pprPrec :: Rational -> HsImplicitBndrs name thing -> SDoc #
(OutputableBndr idL, OutputableBndr idR) => Outputable (PatSynBind idL idR) # |
Methods ppr :: PatSynBind idL idR -> SDoc # pprPrec :: Rational -> PatSynBind idL idR -> SDoc #
(OutputableBndr idL, OutputableBndr idR) => Outputable (HsBindLR idL idR) # |
Methods ppr :: HsBindLR idL idR -> SDoc # pprPrec :: Rational -> HsBindLR idL idR -> SDoc #
(OutputableBndr idL, OutputableBndr idR) => Outputable (HsValBindsLR idL idR) # |
Methods ppr :: HsValBindsLR idL idR -> SDoc # pprPrec :: Rational -> HsValBindsLR idL idR -> SDoc #
(OutputableBndr idL, OutputableBndr idR) => Outputable (HsLocalBindsLR idL idR) # |
Methods ppr :: HsLocalBindsLR idL idR -> SDoc # pprPrec :: Rational -> HsLocalBindsLR idL idR -> SDoc #
(Outputable id, Outputable arg) => Outputable (HsRecField' id arg) # |
Methods ppr :: HsRecField' id arg -> SDoc # pprPrec :: Rational -> HsRecField' id arg -> SDoc #
Outputable arg => Outputable (HsRecFields id arg) # |
Methods ppr :: HsRecFields id arg -> SDoc # pprPrec :: Rational -> HsRecFields id arg -> SDoc #
OutputableBndr idL => Outputable (ParStmtBlock idL idR) # |
Methods ppr :: ParStmtBlock idL idR -> SDoc # pprPrec :: Rational -> ParStmtBlock idL idR -> SDoc #
(Outputable a, Outputable b, Outputable c) => Outputable (a, b, c) # |
Methods ppr :: (a, b, c) -> SDoc # pprPrec :: Rational -> (a, b, c) -> SDoc #
(OutputableBndr idL, OutputableBndr idR, Outputable body) => Outputable (StmtLR idL idR body) # |
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) # |
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) # |
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) # |
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) # |
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

Methods

pprBndr :: BindingSite -> a -> SDoc #

pprPrefixOcc, pprInfixOcc :: a -> SDoc #

Instances

OutputableBndr OccName # |
Methods pprBndr :: BindingSite -> OccName -> SDoc # pprPrefixOcc :: OccName -> SDoc # pprInfixOcc :: OccName -> SDoc #
OutputableBndr Name # |
Methods pprBndr :: BindingSite -> Name -> SDoc # pprPrefixOcc :: Name -> SDoc # pprInfixOcc :: Name -> SDoc #
OutputableBndr DataCon # |
Methods pprBndr :: BindingSite -> DataCon -> SDoc # pprPrefixOcc :: DataCon -> SDoc # pprInfixOcc :: DataCon -> SDoc #
OutputableBndr PatSyn # |
Methods pprBndr :: BindingSite -> PatSyn -> SDoc # pprPrefixOcc :: PatSyn -> SDoc # pprInfixOcc :: PatSyn -> SDoc #
OutputableBndr ConLike # |
Methods pprBndr :: BindingSite -> ConLike -> SDoc # pprPrefixOcc :: ConLike -> SDoc # pprInfixOcc :: ConLike -> SDoc #
OutputableBndr RdrName # |
Methods pprBndr :: BindingSite -> RdrName -> SDoc # pprPrefixOcc :: RdrName -> SDoc # pprInfixOcc :: RdrName -> SDoc #
OutputableBndr HsIPName # |
Methods pprBndr :: BindingSite -> HsIPName -> SDoc # pprPrefixOcc :: HsIPName -> SDoc # pprInfixOcc :: HsIPName -> SDoc #
Outputable b => OutputableBndr (TaggedBndr b) # |
Methods pprBndr :: BindingSite -> TaggedBndr b -> SDoc # pprPrefixOcc :: TaggedBndr b -> SDoc # pprInfixOcc :: TaggedBndr b -> SDoc #
OutputableBndr (AmbiguousFieldOcc name) # |
Methods pprBndr :: BindingSite -> AmbiguousFieldOcc name -> SDoc # pprPrefixOcc :: AmbiguousFieldOcc name -> SDoc # pprInfixOcc :: AmbiguousFieldOcc name -> SDoc #

# Pretty printing combinators

data SDoc #

Instances

IsString SDoc # |
Methods fromString :: String -> SDoc Source #

runSDoc :: SDoc -> SDocContext -> Doc #

initSDocContext :: DynFlags -> PprStyle -> SDocContext #

docToSDoc :: Doc -> SDoc #

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.

quotedListWithOr :: [SDoc] -> SDoc #

quotedListWithNor :: [SDoc] -> SDoc #

empty :: SDoc #

isEmpty :: DynFlags -> SDoc -> Bool #

nest :: Int -> SDoc -> SDoc #

Indent `SDoc` some specified amount

char :: Char -> SDoc #

text :: String -> SDoc #

ftext :: FastString -> SDoc #

ptext :: LitString -> SDoc #

ztext :: FastZString -> SDoc #

int :: Int -> SDoc #

intWithCommas :: Integral a => a -> SDoc #

integer :: Integer -> SDoc #

float :: Float -> SDoc #

double :: Double -> SDoc #

rational :: Rational -> SDoc #

doublePrec :: Int -> Double -> SDoc #

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

parens :: SDoc -> SDoc #

cparen :: Bool -> SDoc -> SDoc #

brackets :: SDoc -> SDoc #

braces :: SDoc -> SDoc #

quotes :: SDoc -> SDoc #

quote :: SDoc -> SDoc #

doubleQuotes :: SDoc -> SDoc #

angleBrackets :: SDoc -> SDoc #

paBrackets :: SDoc -> SDoc #

semi :: SDoc #

comma :: SDoc #

colon :: SDoc #

dcolon :: SDoc #

space :: SDoc #

equals :: SDoc #

dot :: SDoc #

vbar :: SDoc #

arrow :: SDoc #

larrow :: SDoc #

darrow :: SDoc #

arrowt :: SDoc #

larrowt :: SDoc #

arrowtt :: SDoc #

larrowtt :: SDoc #

lparen :: SDoc #

rparen :: SDoc #

lbrack :: SDoc #

rbrack :: SDoc #

lbrace :: SDoc #

rbrace :: SDoc #

underscore :: SDoc #

blankLine :: SDoc #

forAllLit :: 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 #

ppUnless :: 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"

unicodeSyntax :: SDoc -> SDoc -> SDoc #

coloured :: PprColour -> SDoc -> SDoc #

Apply the given colour/style for the argument.

Only takes effect if colours are enabled.

data PprColour #

A colour/style for use with `coloured`.

colType :: PprColour #

colCoerc :: PprColour #

colDataCon :: PprColour #

colBinder :: PprColour #

bold :: SDoc -> SDoc #

keyword :: SDoc -> SDoc #

# Converting `SDoc` into strings and outputing it

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

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

printForUser :: DynFlags -> Handle -> PrintUnqualified -> SDoc -> IO () #

printForUserPartWay :: DynFlags -> Handle -> Int -> PrintUnqualified -> SDoc -> IO () #

pprCode :: CodeStyle -> SDoc -> SDoc #

mkCodeStyle :: CodeStyle -> PprStyle #

showSDoc :: DynFlags -> SDoc -> String #

showSDocUnsafe :: SDoc -> String #

showSDocOneLine :: DynFlags -> SDoc -> String #

showSDocForUser :: DynFlags -> PrintUnqualified -> SDoc -> String #

showSDocDebug :: DynFlags -> SDoc -> String #

showSDocDump :: DynFlags -> SDoc -> String #

showSDocDumpOneLine :: DynFlags -> SDoc -> String #

showSDocUnqual :: DynFlags -> SDoc -> String #

showPpr :: Outputable a => DynFlags -> a -> String #

renderWithStyle :: DynFlags -> SDoc -> PprStyle -> String #

pprInfixVar :: Bool -> SDoc -> SDoc #

pprPrefixVar :: Bool -> SDoc -> SDoc #

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.

primFloatSuffix :: SDoc #

primDoubleSuffix :: SDoc #

pprPrimChar :: Char -> SDoc #

Special combinator for showing unboxed literals.

pprPrimInt :: Integer -> SDoc #

pprPrimWord :: Integer -> SDoc #

pprPrimInt64 :: Integer -> SDoc #

pprPrimWord64 :: Integer -> SDoc #

pprFastFilePath :: FastString -> SDoc #

# 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.

Constructors

LambdaBind |
CaseBind |
LetBind |

data PprStyle #

Instances

Outputable PprStyle # |
Methods ppr :: PprStyle -> SDoc # pprPrec :: Rational -> PprStyle -> SDoc #

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`.

Constructors

QueryQualify |
Fields queryQualifyName :: QueryQualifyName queryQualifyModule :: QueryQualifyModule queryQualifyPackage :: QueryQualifyPackage

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 unit id to disambiguate it.

reallyAlwaysQualify :: PrintUnqualified #

reallyAlwaysQualifyNames :: QueryQualifyName #

alwaysQualify :: PrintUnqualified #

alwaysQualifyNames :: QueryQualifyName #

NB: This won't ever show package IDs

alwaysQualifyModules :: QueryQualifyModule #

neverQualify :: PrintUnqualified #

neverQualifyNames :: QueryQualifyName #

neverQualifyModules :: QueryQualifyModule #

alwaysQualifyPackages :: QueryQualifyPackage #

neverQualifyPackages :: QueryQualifyPackage #

data QualifyName #

Constructors

NameUnqual |
NameQual ModuleName |
NameNotInScope1 |
NameNotInScope2 |

queryQual :: PprStyle -> PrintUnqualified #

sdocWithDynFlags :: (DynFlags -> SDoc) -> SDoc #

sdocWithPlatform :: (Platform -> SDoc) -> SDoc #

getPprStyle :: (PprStyle -> SDoc) -> SDoc #

withPprStyle :: PprStyle -> SDoc -> SDoc #

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

pprDeeper :: SDoc -> SDoc #

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

Truncate a list that is longer than the current depth.

pprSetDepth :: Depth -> SDoc -> SDoc #

codeStyle :: PprStyle -> Bool #

userStyle :: PprStyle -> Bool #

debugStyle :: PprStyle -> Bool #

dumpStyle :: PprStyle -> Bool #

asmStyle :: PprStyle -> Bool #

ifPprDebug :: SDoc -> SDoc #

qualName :: PprStyle -> QueryQualifyName #

qualModule :: PprStyle -> QueryQualifyModule #

qualPackage :: PprStyle -> QueryQualifyPackage #

mkErrStyle :: DynFlags -> PrintUnqualified -> PprStyle #

Style for printing error messages

defaultErrStyle :: DynFlags -> PprStyle #

defaultDumpStyle :: PprStyle #

mkDumpStyle :: PrintUnqualified -> PprStyle #

defaultUserStyle :: PprStyle #

mkUserStyle :: PrintUnqualified -> Depth -> PprStyle #

cmdlineParserStyle :: PprStyle #

data Depth #

Constructors

AllTheWay |
PartWay Int |

# Error handling and debugging utilities

pprPanic :: String -> SDoc -> a #

Throw an exception saying "bug in GHC"

pprSorry :: String -> SDoc -> a #

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

assertPprPanic :: (?callStack :: CallStack) => 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

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 :: (?callStack :: CallStack) => SDoc -> a -> a #

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

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.

    trace ("calling f with x = " ++ show x) (f x)

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 an failed assertion exception for a given filename and line number.

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