language-java-0.2.8: Java source manipulation

Safe HaskellSafe
LanguageHaskell98

Language.Java.Pretty

Documentation

class Pretty a where Source #

Methods

pretty :: a -> Doc Source #

prettyPrec :: Int -> a -> Doc Source #

Instances

Pretty Name Source # 
Pretty Ident Source # 
Pretty TypeParam Source # 
Pretty PrimType Source # 
Pretty WildcardBound Source # 
Pretty TypeDeclSpecifier Source # 
Pretty TypeArgument Source # 
Pretty Package Source # 
Pretty ClassName Source # 
Pretty ClassType Source # 
Pretty RefType Source # 
Pretty Type Source # 
Pretty AssignOp Source # 
Pretty Op Source # 

Methods

pretty :: Op -> Doc Source #

prettyPrec :: Int -> Op -> Doc Source #

Pretty Literal Source # 
Show l => Pretty (ArrayInit l) Source # 
Show l => Pretty (TypeMethodCall l) Source # 
Show l => Pretty (ClassMethodCall l) Source # 
Show l => Pretty (SuperMethodCall l) Source # 
Show l => Pretty (PrimaryMethodCall l) Source # 
Show l => Pretty (MethodCall l) Source # 
Show l => Pretty (LambdaInferredParams l) Source # 
Show l => Pretty (LambdaFormalParams l) Source # 
Show l => Pretty (LambdaSingleParam l) Source # 
Show l => Pretty (ClassFieldAccess l) Source # 
Show l => Pretty (SuperFieldAccess l) Source # 
Show l => Pretty (PrimaryFieldAccess l) Source # 
Show l => Pretty (ArrayIndex l) Source # 
Show l => Pretty (NameLhs l) Source # 
Show l => Pretty (MethodRef l) Source # 
Show l => Pretty (Lambda l) Source # 

Methods

pretty :: Lambda l -> Doc Source #

prettyPrec :: Int -> Lambda l -> Doc Source #

Show l => Pretty (Assign l) Source # 

Methods

pretty :: Assign l -> Doc Source #

prettyPrec :: Int -> Assign l -> Doc Source #

Show l => Pretty (Cond l) Source # 

Methods

pretty :: Cond l -> Doc Source #

prettyPrec :: Int -> Cond l -> Doc Source #

Show l => Pretty (InstanceOf l) Source # 
Show l => Pretty (BinOp l) Source # 

Methods

pretty :: BinOp l -> Doc Source #

prettyPrec :: Int -> BinOp l -> Doc Source #

Show l => Pretty (Cast l) Source # 

Methods

pretty :: Cast l -> Doc Source #

prettyPrec :: Int -> Cast l -> Doc Source #

Show l => Pretty (ExpName l) Source # 
Show l => Pretty (ArrayCreateInit l) Source # 
Show l => Pretty (ArrayCreate l) Source # 
Show l => Pretty (QualInstanceCreation l) Source # 
Show l => Pretty (InstanceCreation l) Source # 
Show l => Pretty (QualifiedThis l) Source # 
Show l => Pretty (This l) Source # 

Methods

pretty :: This l -> Doc Source #

prettyPrec :: Int -> This l -> Doc Source #

Show l => Pretty (ClassLit l) Source # 
Show l => Pretty (Lit l) Source # 

Methods

pretty :: Lit l -> Doc Source #

prettyPrec :: Int -> Lit l -> Doc Source #

Pretty (ExceptionType l) Source # 
Show l => Pretty (ForInitExps l) Source # 
Show l => Pretty (ForLocalVars l) Source # 
Show l => Pretty (SwitchBlock l) Source # 
Show l => Pretty (TryResourceFinalVar l) Source # 
Show l => Pretty (TryResourceVar l) Source # 
Show l => Pretty (Catch l) Source # 

Methods

pretty :: Catch l -> Doc Source #

prettyPrec :: Int -> Catch l -> Doc Source #

Show l => Pretty (Labeled l) Source # 
Show l => Pretty (Try l) Source # 

Methods

pretty :: Try l -> Doc Source #

prettyPrec :: Int -> Try l -> Doc Source #

Show l => Pretty (Throw l) Source # 

Methods

pretty :: Throw l -> Doc Source #

prettyPrec :: Int -> Throw l -> Doc Source #

Show l => Pretty (Synchronized l) Source # 
Show l => Pretty (Return l) Source # 

Methods

pretty :: Return l -> Doc Source #

prettyPrec :: Int -> Return l -> Doc Source #

Show l => Pretty (Continue l) Source # 
Show l => Pretty (Break l) Source # 

Methods

pretty :: Break l -> Doc Source #

prettyPrec :: Int -> Break l -> Doc Source #

Show l => Pretty (Do l) Source # 

Methods

pretty :: Do l -> Doc Source #

prettyPrec :: Int -> Do l -> Doc Source #

Show l => Pretty (Switch l) Source # 

Methods

pretty :: Switch l -> Doc Source #

prettyPrec :: Int -> Switch l -> Doc Source #

Show l => Pretty (Assert l) Source # 

Methods

pretty :: Assert l -> Doc Source #

prettyPrec :: Int -> Assert l -> Doc Source #

Show l => Pretty (Empty l) Source # 

Methods

pretty :: Empty l -> Doc Source #

prettyPrec :: Int -> Empty l -> Doc Source #

Show l => Pretty (EnhancedFor l) Source # 
Show l => Pretty (BasicFor l) Source # 
Show l => Pretty (While l) Source # 

Methods

pretty :: While l -> Doc Source #

prettyPrec :: Int -> While l -> Doc Source #

Show l => Pretty (IfThenElse l) Source # 
Show l => Pretty (LocalVars l) Source # 
Show l => Pretty (Block l) Source # 

Methods

pretty :: Block l -> Doc Source #

prettyPrec :: Int -> Block l -> Doc Source #

Show l => Pretty (ElementValue l) Source # 
Show l => Pretty (Annotation l) Source # 
Show l => Pretty (Modifier l) Source # 
Show l => Pretty (PrimarySuperInvoke l) Source # 
Show l => Pretty (SuperInvoke l) Source # 
Show l => Pretty (ThisInvoke l) Source # 
Show l => Pretty (ConstructorBody l) Source # 
Show l => Pretty (MethodBody l) Source # 
Show l => Pretty (FormalParam l) Source # 
Pretty (VarId l) Source # 

Methods

pretty :: VarId l -> Doc Source #

prettyPrec :: Int -> VarId l -> Doc Source #

Show l => Pretty (VarDecl l) Source # 
Show l => Pretty (ConstructorDecl l) Source # 
Show l => Pretty (MethodDecl l) Source # 
Show l => Pretty (FieldDecl l) Source # 
Show l => Pretty (InitDecl l) Source # 
Show l => Pretty (InterfaceBody l) Source # 
Show l => Pretty (InterfaceDecl l) Source # 
Show l => Pretty (EnumConstant l) Source # 
Show l => Pretty (EnumBody l) Source # 
Show l => Pretty (ClassBody l) Source # 
Show l => Pretty (Implements l) Source # 
Show l => Pretty (Extends l) Source # 
Show l => Pretty (EnumDecl l) Source # 
Show l => Pretty (ClassDecl l) Source # 
Pretty (ImportDecl l) Source # 
Pretty (ModuleExports l) Source # 
Pretty (ModuleRequires l) Source # 
Pretty (PackageDecl l) Source # 
Show l => Pretty (ModuleDeclaration l) Source # 
Show l => Pretty (CompilationUnit l) Source # 
Show l => Pretty (MethodInvocationNode l) Source # 
Show l => Pretty (LambdaExpressionNode l) Source # 
Show l => Pretty (LambdaParamsNode l) Source # 
Show l => Pretty (FieldAccessNode l) Source # 
Show l => Pretty (LhsNode l) Source # 
Show l => Pretty (ExpNode l) Source # 
Show l => Pretty (ForInitNode l) Source # 
Show l => Pretty (SwitchLabelNode l) Source # 
Show l => Pretty (TryResourceNode l) Source # 
Show l => Pretty (StmtNode l) Source # 
Show l => Pretty (BlockStmtNode l) Source # 
Show l => Pretty (ExplConstrInvNode l) Source # 
Show l => Pretty (VarInitNode l) Source # 
Show l => Pretty (VarDeclIdNode l) Source # 
Show l => Pretty (MemberDeclNode l) Source # 
Show l => Pretty (DeclNode l) Source # 
Show l => Pretty (ClassDeclNode l) Source # 
Show l => Pretty (TypeDeclNode l) Source # 
Show l => Pretty (ModuleSpecNode l) Source # 
Show l => Pretty (CompilationUnitNode l) Source # 

ppEVList :: (Pretty a, Pretty a1) => Int -> [(a1, a)] -> Doc Source #

ppArgs :: Pretty a => [a] -> Doc Source #

ppTypeParams :: Pretty a => Int -> [a] -> Doc Source #

ppExtends :: Show l => Int -> [Extends l] -> Doc Source #

maybePP :: Pretty a => Int -> Maybe a -> Doc Source #

opt :: Bool -> Doc -> Doc Source #

opPrec :: Num t => Op -> t Source #