Language.Haskell.TH.Ppr

template-haskell-2.13.0.0: Support library for Template Haskell

Safe Haskell | Safe
Language | Haskell2010

Language.Haskell.TH.Ppr

Description

contains a prettyprinter for the Template Haskell datatypes

Synopsis

- nestDepth :: Int
- type Precedence = Int
- appPrec :: Precedence
- unopPrec :: Precedence
- opPrec :: Precedence
- noPrec :: Precedence
- parensIf :: Bool -> Doc -> Doc
- pprint :: Ppr a => a -> String
- class Ppr a where
- ppr_sig :: Name -> Type -> Doc
- pprFixity :: Name -> Fixity -> Doc
- pprPatSynSig :: Name -> PatSynType -> Doc
- pprPatSynType :: PatSynType -> Doc
- pprPrefixOcc :: Name -> Doc
- isSymOcc :: Name -> Bool
- pprInfixExp :: Exp -> Doc
- pprExp :: Precedence -> Exp -> Doc
- pprFields :: [(Name, Exp)] -> Doc
- pprMaybeExp :: Precedence -> Maybe Exp -> Doc
- pprGuarded :: Doc -> (Guard, Exp) -> Doc
- pprBody :: Bool -> Body -> Doc
- pprLit :: Precedence -> Lit -> Doc
- bytesToString :: [Word8] -> String
- pprString :: String -> Doc
- pprPat :: Precedence -> Pat -> Doc
- ppr_dec :: Bool -> Dec -> Doc
- ppr_deriv_strategy :: DerivStrategy -> Doc
- ppr_overlap :: Overlap -> Doc
- ppr_data :: Doc -> Cxt -> Name -> Doc -> Maybe Kind -> [Con] -> [DerivClause] -> Doc
- ppr_newtype :: Doc -> Cxt -> Name -> Doc -> Maybe Kind -> Con -> [DerivClause] -> Doc
- ppr_deriv_clause :: DerivClause -> Doc
- ppr_tySyn :: Doc -> Name -> Doc -> Type -> Doc
- ppr_tf_head :: TypeFamilyHead -> Doc
- commaSepApplied :: [Name] -> Doc
- pprForall :: [TyVarBndr] -> Cxt -> Doc
- pprRecFields :: [(Name, Strict, Type)] -> Type -> Doc
- pprGadtRHS :: [(Strict, Type)] -> Type -> Doc
- pprVarBangType :: VarBangType -> Doc
- pprBangType :: BangType -> Doc
- pprVarStrictType :: (Name, Strict, Type) -> Doc
- pprStrictType :: (Strict, Type) -> Doc
- pprParendType :: Type -> Doc
- pprUInfixT :: Type -> Doc
- pprTyApp :: (Type, [Type]) -> Doc
- pprFunArgType :: Type -> Doc
- split :: Type -> (Type, [Type])
- pprTyLit :: TyLit -> Doc
- pprCxt :: Cxt -> Doc
- ppr_cxt_preds :: Cxt -> Doc
- where_clause :: [Dec] -> Doc
- showtextl :: Show a => a -> Doc
- hashParens :: Doc -> Doc
- quoteParens :: Doc -> Doc
- commaSep :: Ppr a => [a] -> Doc
- commaSepWith :: (a -> Doc) -> [a] -> Doc
- semiSep :: Ppr a => [a] -> Doc
- unboxedSumBars :: Doc -> SumAlt -> SumArity -> Doc
- bar :: Doc

# Documentation

nestDepth :: Int #

type Precedence = Int #

appPrec :: Precedence #

unopPrec :: Precedence #

opPrec :: Precedence #

noPrec :: Precedence #

parensIf :: Bool -> Doc -> Doc #

pprint :: Ppr a => a -> String #

class Ppr a where #

Minimal complete definition

ppr

Methods

ppr :: a -> Doc #

ppr_list :: [a] -> Doc #

Instances

Ppr Exp # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Exp -> Doc # ppr_list :: [Exp] -> Doc #
Ppr Match # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Match -> Doc # ppr_list :: [Match] -> Doc #
Ppr Clause # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Clause -> Doc # ppr_list :: [Clause] -> Doc #
Ppr Pat # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Pat -> Doc # ppr_list :: [Pat] -> Doc #
Ppr Type # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Type -> Doc # ppr_list :: [Type] -> Doc #
Ppr Dec # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Dec -> Doc # ppr_list :: [Dec] -> Doc #
Ppr Name # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Name -> Doc # ppr_list :: [Name] -> Doc #
Ppr FunDep # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: FunDep -> Doc # ppr_list :: [FunDep] -> Doc #
Ppr InjectivityAnn # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: InjectivityAnn -> Doc # ppr_list :: [InjectivityAnn] -> Doc #
Ppr Role # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Role -> Doc # ppr_list :: [Role] -> Doc #
Ppr TyLit # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: TyLit -> Doc # ppr_list :: [TyLit] -> Doc #
Ppr FamilyResultSig # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: FamilyResultSig -> Doc # ppr_list :: [FamilyResultSig] -> Doc #
Ppr TyVarBndr # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: TyVarBndr -> Doc # ppr_list :: [TyVarBndr] -> Doc #
Ppr PatSynArgs # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: PatSynArgs -> Doc # ppr_list :: [PatSynArgs] -> Doc #
Ppr PatSynDir # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: PatSynDir -> Doc # ppr_list :: [PatSynDir] -> Doc #
Ppr Bang # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Bang -> Doc # ppr_list :: [Bang] -> Doc #
Ppr Con # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Con -> Doc # ppr_list :: [Con] -> Doc #
Ppr DecidedStrictness # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: DecidedStrictness -> Doc # ppr_list :: [DecidedStrictness] -> Doc #
Ppr SourceStrictness # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: SourceStrictness -> Doc # ppr_list :: [SourceStrictness] -> Doc #
Ppr SourceUnpackedness # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: SourceUnpackedness -> Doc # ppr_list :: [SourceUnpackedness] -> Doc #
Ppr RuleBndr # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: RuleBndr -> Doc # ppr_list :: [RuleBndr] -> Doc #
Ppr Phases # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Phases -> Doc # ppr_list :: [Phases] -> Doc #
Ppr RuleMatch # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: RuleMatch -> Doc # ppr_list :: [RuleMatch] -> Doc #
Ppr Inline # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Inline -> Doc # ppr_list :: [Inline] -> Doc #
Ppr Pragma # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Pragma -> Doc # ppr_list :: [Pragma] -> Doc #
Ppr Foreign # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Foreign -> Doc # ppr_list :: [Foreign] -> Doc #
Ppr Range # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Range -> Doc # ppr_list :: [Range] -> Doc #
Ppr Stmt # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Stmt -> Doc # ppr_list :: [Stmt] -> Doc #
Ppr Lit # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Lit -> Doc # ppr_list :: [Lit] -> Doc #
Ppr ModuleInfo # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: ModuleInfo -> Doc # ppr_list :: [ModuleInfo] -> Doc #
Ppr Info # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Info -> Doc # ppr_list :: [Info] -> Doc #
Ppr Loc # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Loc -> Doc # ppr_list :: [Loc] -> Doc #
Ppr Module # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: Module -> Doc # ppr_list :: [Module] -> Doc #
Ppr a => Ppr [a] # |
Instance details Defined in Language.Haskell.TH.Ppr Methods ppr :: [a] -> Doc # ppr_list :: [[a]] -> Doc #

ppr_sig :: Name -> Type -> Doc #

pprFixity :: Name -> Fixity -> Doc #

pprPatSynSig :: Name -> PatSynType -> Doc #

Pretty prints a pattern synonym type signature

pprPatSynType :: PatSynType -> Doc #

Pretty prints a pattern synonym's type; follows the usual conventions to print a pattern synonym type compactly, yet unambiguously. See the note on `PatSynType` and the section on pattern synonyms in the GHC user's guide for more information.

pprPrefixOcc :: Name -> Doc #

isSymOcc :: Name -> Bool #

pprInfixExp :: Exp -> Doc #

pprExp :: Precedence -> Exp -> Doc #

pprFields :: [(Name, Exp)] -> Doc #

pprMaybeExp :: Precedence -> Maybe Exp -> Doc #

pprGuarded :: Doc -> (Guard, Exp) -> Doc #

pprBody :: Bool -> Body -> Doc #

pprLit :: Precedence -> Lit -> Doc #

bytesToString :: [Word8] -> String #

pprString :: String -> Doc #

pprPat :: Precedence -> Pat -> Doc #

ppr_dec :: Bool -> Dec -> Doc #

ppr_deriv_strategy :: DerivStrategy -> Doc #

ppr_overlap :: Overlap -> Doc #

ppr_data :: Doc -> Cxt -> Name -> Doc -> Maybe Kind -> [Con] -> [DerivClause] -> Doc #

ppr_newtype :: Doc -> Cxt -> Name -> Doc -> Maybe Kind -> Con -> [DerivClause] -> Doc #

ppr_deriv_clause :: DerivClause -> Doc #

ppr_tySyn :: Doc -> Name -> Doc -> Type -> Doc #

ppr_tf_head :: TypeFamilyHead -> Doc #

commaSepApplied :: [Name] -> Doc #

pprForall :: [TyVarBndr] -> Cxt -> Doc #

pprRecFields :: [(Name, Strict, Type)] -> Type -> Doc #

pprGadtRHS :: [(Strict, Type)] -> Type -> Doc #

pprVarBangType :: VarBangType -> Doc #

pprBangType :: BangType -> Doc #

pprVarStrictType :: (Name, Strict, Type) -> Doc #

Deprecated: As of `template-haskell-2.11.0.0`, `VarStrictType` has been replaced by `VarBangType`. Please use `pprVarBangType` instead.

pprStrictType :: (Strict, Type) -> Doc #

Deprecated: As of `template-haskell-2.11.0.0`, `StrictType` has been replaced by `BangType`. Please use `pprBangType` instead.

pprParendType :: Type -> Doc #

pprUInfixT :: Type -> Doc #

pprTyApp :: (Type, [Type]) -> Doc #

pprFunArgType :: Type -> Doc #

split :: Type -> (Type, [Type]) #

pprTyLit :: TyLit -> Doc #

pprCxt :: Cxt -> Doc #

ppr_cxt_preds :: Cxt -> Doc #

where_clause :: [Dec] -> Doc #

showtextl :: Show a => a -> Doc #

hashParens :: Doc -> Doc #

quoteParens :: Doc -> Doc #

commaSep :: Ppr a => [a] -> Doc #

commaSepWith :: (a -> Doc) -> [a] -> Doc #

semiSep :: Ppr a => [a] -> Doc #

unboxedSumBars :: Doc -> SumAlt -> SumArity -> Doc #

bar :: Doc #