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_overlap :: Overlap -> 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 #

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

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_overlap :: Overlap -> 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 #

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 #