language-c-quote-0.13.0.2: C/CUDA/OpenCL/Objective-C quasiquoting library.

Copyright | (c) 2006-2011 Harvard University (c) 2011-2013 Geoffrey Mainland : (c) 2013-2016 Drexel University
License | BSD-style
Maintainer | mainland@drexel.edu
Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.C.Pretty

Contents

- Orphan instances

Description

Synopsis

- pprLoc :: SrcLoc -> Doc -> Doc
- data Fixity = Fixity Assoc Int
- data Assoc
  - = LeftAssoc
  - | RightAssoc
  - | NonAssoc
- infix_ :: Int -> Fixity
- infixl_ :: Int -> Fixity
- infixr_ :: Int -> Fixity
- infixop :: (Pretty a, Pretty b, Pretty op, CFixity op) => Int -> op -> a -> b -> Doc
- prefixop :: (Pretty a, Pretty op, CFixity op) => Int -> op -> a -> Doc
- parensList :: [Doc] -> Doc
- bracesList :: [Doc] -> Doc
- bracesSemiList :: [Doc] -> Doc
- angleList :: [Doc] -> Doc
- embrace :: [Doc] -> Doc
- pprAnti :: String -> String -> Doc
- class CFixity a where
  - fixity :: a -> Fixity
  - parensOp :: Int -> a -> Doc -> Doc
- commaPrec :: Int
- commaPrec1 :: Int
- condPrec :: Int
- condPrec1 :: Int
- unopPrec :: Int
- unopPrec1 :: Int
- memberPrec :: Int
- memberPrec1 :: Int
- pprStructOrUnion :: String -> Maybe Id -> Maybe [FieldGroup] -> [Attr] -> Doc
- pprEnum :: Maybe Id -> [CEnum] -> [Attr] -> Doc
- pprDeclarator :: Maybe Id -> Decl -> Doc
- pprIfaceBody :: [Id] -> [ObjCIvarDecl] -> [ObjCIfaceDecl] -> Doc
- pprBlock :: Stm -> Doc

# Documentation

pprLoc :: SrcLoc -> Doc -> Doc Source #

data Fixity Source #

Constructors

Fixity Assoc Int |

#### Instances

Instances details

Eq Fixity Source # |
Instance details Defined in Language.C.Pretty Methods (==) :: Fixity -> Fixity -> Bool Source # (/=) :: Fixity -> Fixity -> Bool Source #
Ord Fixity Source # |
Instance details Defined in Language.C.Pretty Methods compare :: Fixity -> Fixity -> Ordering Source # (<) :: Fixity -> Fixity -> Bool Source # (<=) :: Fixity -> Fixity -> Bool Source # (>) :: Fixity -> Fixity -> Bool Source # (>=) :: Fixity -> Fixity -> Bool Source # max :: Fixity -> Fixity -> Fixity Source # min :: Fixity -> Fixity -> Fixity Source #

data Assoc Source #

Constructors

LeftAssoc |
RightAssoc |
NonAssoc |

#### Instances

Instances details

Eq Assoc Source # |
Instance details Defined in Language.C.Pretty Methods (==) :: Assoc -> Assoc -> Bool Source # (/=) :: Assoc -> Assoc -> Bool Source #
Ord Assoc Source # |
Instance details Defined in Language.C.Pretty Methods compare :: Assoc -> Assoc -> Ordering Source # (<) :: Assoc -> Assoc -> Bool Source # (<=) :: Assoc -> Assoc -> Bool Source # (>) :: Assoc -> Assoc -> Bool Source # (>=) :: Assoc -> Assoc -> Bool Source # max :: Assoc -> Assoc -> Assoc Source # min :: Assoc -> Assoc -> Assoc Source #

infix_ :: Int -> Fixity Source #

infixl_ :: Int -> Fixity Source #

infixr_ :: Int -> Fixity Source #

infixop Source #

Arguments

:: (Pretty a, Pretty b, Pretty op, CFixity op) |
=> Int | precedence of context
-> op | operator
-> a | left argument
-> b | right argument
-> Doc |

Pretty print infix binary operators

prefixop Source #

Arguments

:: (Pretty a, Pretty op, CFixity op) |
=> Int | precedence of context
-> op | operator
-> a | argument
-> Doc |

Pretty print prefix unary operators

parensList :: [Doc] -> Doc Source #

bracesList :: [Doc] -> Doc Source #

bracesSemiList :: [Doc] -> Doc Source #

angleList :: [Doc] -> Doc Source #

embrace :: [Doc] -> Doc Source #

pprAnti :: String -> String -> Doc Source #

class CFixity a where Source #

Minimal complete definition

fixity

Methods

fixity :: a -> Fixity Source #

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

#### Instances

Instances details

CFixity AssignOp Source # |
Instance details Defined in Language.C.Pretty Methods fixity :: AssignOp -> Fixity Source # parensOp :: Int -> AssignOp -> Doc -> Doc Source #
CFixity BinOp Source # |
Instance details Defined in Language.C.Pretty Methods fixity :: BinOp -> Fixity Source # parensOp :: Int -> BinOp -> Doc -> Doc Source #
CFixity UnOp Source # |
Instance details Defined in Language.C.Pretty Methods fixity :: UnOp -> Fixity Source # parensOp :: Int -> UnOp -> Doc -> Doc Source #

commaPrec :: Int Source #

commaPrec1 :: Int Source #

condPrec :: Int Source #

condPrec1 :: Int Source #

unopPrec :: Int Source #

unopPrec1 :: Int Source #

memberPrec :: Int Source #

memberPrec1 :: Int Source #

pprStructOrUnion :: String -> Maybe Id -> Maybe [FieldGroup] -> [Attr] -> Doc Source #

pprEnum :: Maybe Id -> [CEnum] -> [Attr] -> Doc Source #

pprDeclarator :: Maybe Id -> Decl -> Doc Source #

pprIfaceBody :: [Id] -> [ObjCIvarDecl] -> [ObjCIfaceDecl] -> Doc Source #

pprBlock :: Stm -> Doc Source #

# Orphan instances

Pretty ArraySize Source # |
Instance details Methods ppr :: ArraySize -> Doc Source # pprPrec :: Int -> ArraySize -> Doc Source # pprList :: [ArraySize] -> Doc Source #
Pretty AsmIn Source # |
Instance details Methods ppr :: AsmIn -> Doc Source # pprPrec :: Int -> AsmIn -> Doc Source # pprList :: [AsmIn] -> Doc Source #
Pretty AsmOut Source # |
Instance details Methods ppr :: AsmOut -> Doc Source # pprPrec :: Int -> AsmOut -> Doc Source # pprList :: [AsmOut] -> Doc Source #
Pretty AssignOp Source # |
Instance details Methods ppr :: AssignOp -> Doc Source # pprPrec :: Int -> AssignOp -> Doc Source # pprList :: [AssignOp] -> Doc Source #
Pretty Attr Source # |
Instance details Methods ppr :: Attr -> Doc Source # pprPrec :: Int -> Attr -> Doc Source # pprList :: [Attr] -> Doc Source #
Pretty BinOp Source # |
Instance details Methods ppr :: BinOp -> Doc Source # pprPrec :: Int -> BinOp -> Doc Source # pprList :: [BinOp] -> Doc Source #
Pretty BlockItem Source # |
Instance details Methods ppr :: BlockItem -> Doc Source # pprPrec :: Int -> BlockItem -> Doc Source # pprList :: [BlockItem] -> Doc Source #
Pretty BlockType Source # |
Instance details Methods ppr :: BlockType -> Doc Source # pprPrec :: Int -> BlockType -> Doc Source # pprList :: [BlockType] -> Doc Source #
Pretty CEnum Source # |
Instance details Methods ppr :: CEnum -> Doc Source # pprPrec :: Int -> CEnum -> Doc Source # pprList :: [CEnum] -> Doc Source #
Pretty CaptureListEntry Source # |
Instance details Methods ppr :: CaptureListEntry -> Doc Source # pprPrec :: Int -> CaptureListEntry -> Doc Source # pprList :: [CaptureListEntry] -> Doc Source #
Pretty Const Source # |
Instance details Methods ppr :: Const -> Doc Source # pprPrec :: Int -> Const -> Doc Source # pprList :: [Const] -> Doc Source #
Pretty DeclSpec Source # |
Instance details Methods ppr :: DeclSpec -> Doc Source # pprPrec :: Int -> DeclSpec -> Doc Source # pprList :: [DeclSpec] -> Doc Source #
Pretty Definition Source # |
Instance details Methods ppr :: Definition -> Doc Source # pprPrec :: Int -> Definition -> Doc Source # pprList :: [Definition] -> Doc Source #
Pretty Designation Source # |
Instance details Methods ppr :: Designation -> Doc Source # pprPrec :: Int -> Designation -> Doc Source # pprList :: [Designation] -> Doc Source #
Pretty Designator Source # |
Instance details Methods ppr :: Designator -> Doc Source # pprPrec :: Int -> Designator -> Doc Source # pprList :: [Designator] -> Doc Source #
Pretty Exp Source # |
Instance details Methods ppr :: Exp -> Doc Source # pprPrec :: Int -> Exp -> Doc Source # pprList :: [Exp] -> Doc Source #
Pretty Field Source # |
Instance details Methods ppr :: Field -> Doc Source # pprPrec :: Int -> Field -> Doc Source # pprList :: [Field] -> Doc Source #
Pretty FieldGroup Source # |
Instance details Methods ppr :: FieldGroup -> Doc Source # pprPrec :: Int -> FieldGroup -> Doc Source # pprList :: [FieldGroup] -> Doc Source #
Pretty Func Source # |
Instance details Methods ppr :: Func -> Doc Source # pprPrec :: Int -> Func -> Doc Source # pprList :: [Func] -> Doc Source #
Pretty Id Source # |
Instance details Methods ppr :: Id -> Doc Source # pprPrec :: Int -> Id -> Doc Source # pprList :: [Id] -> Doc Source #
Pretty Init Source # |
Instance details Methods ppr :: Init -> Doc Source # pprPrec :: Int -> Init -> Doc Source # pprList :: [Init] -> Doc Source #
Pretty InitGroup Source # |
Instance details Methods ppr :: InitGroup -> Doc Source # pprPrec :: Int -> InitGroup -> Doc Source # pprList :: [InitGroup] -> Doc Source #
Pretty Initializer Source # |
Instance details Methods ppr :: Initializer -> Doc Source # pprPrec :: Int -> Initializer -> Doc Source # pprList :: [Initializer] -> Doc Source #
Pretty LambdaDeclarator Source # |
Instance details Methods ppr :: LambdaDeclarator -> Doc Source # pprPrec :: Int -> LambdaDeclarator -> Doc Source # pprList :: [LambdaDeclarator] -> Doc Source #
Pretty LambdaIntroducer Source # |
Instance details Methods ppr :: LambdaIntroducer -> Doc Source # pprPrec :: Int -> LambdaIntroducer -> Doc Source # pprList :: [LambdaIntroducer] -> Doc Source #
Pretty ObjCCatch Source # |
Instance details Methods ppr :: ObjCCatch -> Doc Source # pprPrec :: Int -> ObjCCatch -> Doc Source # pprList :: [ObjCCatch] -> Doc Source #
Pretty ObjCDictElem Source # |
Instance details Methods ppr :: ObjCDictElem -> Doc Source # pprPrec :: Int -> ObjCDictElem -> Doc Source # pprList :: [ObjCDictElem] -> Doc Source #
Pretty ObjCIfaceDecl Source # |
Instance details Methods ppr :: ObjCIfaceDecl -> Doc Source # pprPrec :: Int -> ObjCIfaceDecl -> Doc Source # pprList :: [ObjCIfaceDecl] -> Doc Source #
Pretty ObjCIvarDecl Source # |
Instance details Methods ppr :: ObjCIvarDecl -> Doc Source # pprPrec :: Int -> ObjCIvarDecl -> Doc Source # pprList :: [ObjCIvarDecl] -> Doc Source #
Pretty ObjCMethodProto Source # |
Instance details Methods ppr :: ObjCMethodProto -> Doc Source # pprPrec :: Int -> ObjCMethodProto -> Doc Source # pprList :: [ObjCMethodProto] -> Doc Source #
Pretty ObjCMethodReq Source # |
Instance details Methods ppr :: ObjCMethodReq -> Doc Source # pprPrec :: Int -> ObjCMethodReq -> Doc Source # pprList :: [ObjCMethodReq] -> Doc Source #
Pretty ObjCParam Source # |
Instance details Methods ppr :: ObjCParam -> Doc Source # pprPrec :: Int -> ObjCParam -> Doc Source # pprList :: [ObjCParam] -> Doc Source #
Pretty ObjCPropAttr Source # |
Instance details Methods ppr :: ObjCPropAttr -> Doc Source # pprPrec :: Int -> ObjCPropAttr -> Doc Source # pprList :: [ObjCPropAttr] -> Doc Source #
Pretty ObjCRecv Source # |
Instance details Methods ppr :: ObjCRecv -> Doc Source # pprPrec :: Int -> ObjCRecv -> Doc Source # pprList :: [ObjCRecv] -> Doc Source #
Pretty ObjCVisibilitySpec Source # |
Instance details Methods ppr :: ObjCVisibilitySpec -> Doc Source # pprPrec :: Int -> ObjCVisibilitySpec -> Doc Source # pprList :: [ObjCVisibilitySpec] -> Doc Source #
Pretty Param Source # |
Instance details Methods ppr :: Param -> Doc Source # pprPrec :: Int -> Param -> Doc Source # pprList :: [Param] -> Doc Source #
Pretty Params Source # |
Instance details Methods ppr :: Params -> Doc Source # pprPrec :: Int -> Params -> Doc Source # pprList :: [Params] -> Doc Source #
Pretty Sign Source # |
Instance details Methods ppr :: Sign -> Doc Source # pprPrec :: Int -> Sign -> Doc Source # pprList :: [Sign] -> Doc Source #
Pretty Stm Source # |
Instance details Methods ppr :: Stm -> Doc Source # pprPrec :: Int -> Stm -> Doc Source # pprList :: [Stm] -> Doc Source #
Pretty Storage Source # |
Instance details Methods ppr :: Storage -> Doc Source # pprPrec :: Int -> Storage -> Doc Source # pprList :: [Storage] -> Doc Source #
Pretty StringLit Source # |
Instance details Methods ppr :: StringLit -> Doc Source # pprPrec :: Int -> StringLit -> Doc Source # pprList :: [StringLit] -> Doc Source #
Pretty Type Source # |
Instance details Methods ppr :: Type -> Doc Source # pprPrec :: Int -> Type -> Doc Source # pprList :: [Type] -> Doc Source #
Pretty TypeQual Source # |
Instance details Methods ppr :: TypeQual -> Doc Source # pprPrec :: Int -> TypeQual -> Doc Source # pprList :: [TypeQual] -> Doc Source #
Pretty TypeSpec Source # |
Instance details Methods ppr :: TypeSpec -> Doc Source # pprPrec :: Int -> TypeSpec -> Doc Source # pprList :: [TypeSpec] -> Doc Source #
Pretty Typedef Source # |
Instance details Methods ppr :: Typedef -> Doc Source # pprPrec :: Int -> Typedef -> Doc Source # pprList :: [Typedef] -> Doc Source #
Pretty UnOp Source # |
Instance details Methods ppr :: UnOp -> Doc Source # pprPrec :: Int -> UnOp -> Doc Source # pprList :: [UnOp] -> Doc Source #