Language.Haskell.TH.Ppr

template-haskell-2.11.0.0: Support library for Template Haskell

Safe Haskell | None
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
- pprPrefixOcc :: Name -> Doc
- isSymOcc :: Name -> Bool
- isSymbolASCII :: Char -> 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_data :: Doc -> Cxt -> Name -> Doc -> Maybe Kind -> [Con] -> Cxt -> Doc
- ppr_newtype :: Doc -> Cxt -> Name -> Doc -> Maybe Kind -> Con -> Cxt -> 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

# Documentation

nestDepth :: Int Source

type Precedence = Int Source

appPrec :: Precedence Source

unopPrec :: Precedence Source

opPrec :: Precedence Source

noPrec :: Precedence Source

parensIf :: Bool -> Doc -> Doc Source

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

class Ppr a where Source

Minimal complete definition

ppr

Methods

ppr :: a -> Doc Source

ppr_list :: [a] -> Doc Source

Instances

Ppr Exp |
Methods ppr :: Exp -> Doc Source ppr_list :: [Exp] -> Doc Source
Ppr Match |
Methods ppr :: Match -> Doc Source ppr_list :: [Match] -> Doc Source
Ppr Clause |
Methods ppr :: Clause -> Doc Source ppr_list :: [Clause] -> Doc Source
Ppr Pat |
Methods ppr :: Pat -> Doc Source ppr_list :: [Pat] -> Doc Source
Ppr Type |
Methods ppr :: Type -> Doc Source ppr_list :: [Type] -> Doc Source
Ppr Dec |
Methods ppr :: Dec -> Doc Source ppr_list :: [Dec] -> Doc Source
Ppr Name |
Methods ppr :: Name -> Doc Source ppr_list :: [Name] -> Doc Source
Ppr FunDep |
Methods ppr :: FunDep -> Doc Source ppr_list :: [FunDep] -> Doc Source
Ppr TyVarBndr |
Methods ppr :: TyVarBndr -> Doc Source ppr_list :: [TyVarBndr] -> Doc Source
Ppr InjectivityAnn |
Methods ppr :: InjectivityAnn -> Doc Source ppr_list :: [InjectivityAnn] -> Doc Source
Ppr Role |
Methods ppr :: Role -> Doc Source ppr_list :: [Role] -> Doc Source
Ppr TyLit |
Methods ppr :: TyLit -> Doc Source ppr_list :: [TyLit] -> Doc Source
Ppr FamilyResultSig |
Methods ppr :: FamilyResultSig -> Doc Source ppr_list :: [FamilyResultSig] -> Doc Source
Ppr Bang |
Methods ppr :: Bang -> Doc Source ppr_list :: [Bang] -> Doc Source
Ppr Con |
Methods ppr :: Con -> Doc Source ppr_list :: [Con] -> Doc Source
Ppr DecidedStrictness |
Methods ppr :: DecidedStrictness -> Doc Source ppr_list :: [DecidedStrictness] -> Doc Source
Ppr SourceStrictness |
Methods ppr :: SourceStrictness -> Doc Source ppr_list :: [SourceStrictness] -> Doc Source
Ppr SourceUnpackedness |
Methods ppr :: SourceUnpackedness -> Doc Source ppr_list :: [SourceUnpackedness] -> Doc Source
Ppr RuleBndr |
Methods ppr :: RuleBndr -> Doc Source ppr_list :: [RuleBndr] -> Doc Source
Ppr Phases |
Methods ppr :: Phases -> Doc Source ppr_list :: [Phases] -> Doc Source
Ppr RuleMatch |
Methods ppr :: RuleMatch -> Doc Source ppr_list :: [RuleMatch] -> Doc Source
Ppr Inline |
Methods ppr :: Inline -> Doc Source ppr_list :: [Inline] -> Doc Source
Ppr Pragma |
Methods ppr :: Pragma -> Doc Source ppr_list :: [Pragma] -> Doc Source
Ppr Foreign |
Methods ppr :: Foreign -> Doc Source ppr_list :: [Foreign] -> Doc Source
Ppr FamFlavour |
Methods ppr :: FamFlavour -> Doc Source ppr_list :: [FamFlavour] -> Doc Source
Ppr Range |
Methods ppr :: Range -> Doc Source ppr_list :: [Range] -> Doc Source
Ppr Stmt |
Methods ppr :: Stmt -> Doc Source ppr_list :: [Stmt] -> Doc Source
Ppr Lit |
Methods ppr :: Lit -> Doc Source ppr_list :: [Lit] -> Doc Source
Ppr ModuleInfo |
Methods ppr :: ModuleInfo -> Doc Source ppr_list :: [ModuleInfo] -> Doc Source
Ppr Info |
Methods ppr :: Info -> Doc Source ppr_list :: [Info] -> Doc Source
Ppr Loc |
Methods ppr :: Loc -> Doc Source ppr_list :: [Loc] -> Doc Source
Ppr Module |
Methods ppr :: Module -> Doc Source ppr_list :: [Module] -> Doc Source
Ppr a => Ppr [a] |
Methods ppr :: [a] -> Doc Source ppr_list :: [[a]] -> Doc Source

ppr_sig :: Name -> Type -> Doc Source

pprFixity :: Name -> Fixity -> Doc Source

pprPrefixOcc :: Name -> Doc Source

isSymOcc :: Name -> Bool Source

isSymbolASCII :: Char -> Bool Source

pprInfixExp :: Exp -> Doc Source

pprExp :: Precedence -> Exp -> Doc Source

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

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

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

pprBody :: Bool -> Body -> Doc Source

pprLit :: Precedence -> Lit -> Doc Source

bytesToString :: [Word8] -> String Source

pprString :: String -> Doc Source

pprPat :: Precedence -> Pat -> Doc Source

ppr_dec :: Bool -> Dec -> Doc Source

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

ppr_newtype :: Doc -> Cxt -> Name -> Doc -> Maybe Kind -> Con -> Cxt -> Doc Source

ppr_tySyn :: Doc -> Name -> Doc -> Type -> Doc Source

ppr_tf_head :: TypeFamilyHead -> Doc Source

commaSepApplied :: [Name] -> Doc Source

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

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

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

pprVarBangType :: VarBangType -> Doc Source

pprBangType :: BangType -> Doc Source

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

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

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

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

pprParendType :: Type -> Doc Source

pprUInfixT :: Type -> Doc Source

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

pprFunArgType :: Type -> Doc Source

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

pprTyLit :: TyLit -> Doc Source

pprCxt :: Cxt -> Doc Source

ppr_cxt_preds :: Cxt -> Doc Source

where_clause :: [Dec] -> Doc Source

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

hashParens :: Doc -> Doc Source

quoteParens :: Doc -> Doc Source

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

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

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