Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype HeaderName = HdrName {}
- newtype Namespace = NS {}
- data PragmaParam = Once
- newtype NamePart (f :: Type -> Type) = NamePart String
- newtype CName (f :: Type -> Type) = CName [NamePart f]
- sname :: String -> CName Identity
- renderCName :: CName Identity -> String
- data CType (f :: Type -> Type)
- data COp
- renderCOp :: COp -> String
- data CExp (f :: Type -> Type)
- = CVar (CName f)
- | CApp (CExp f) [CExp f]
- | CTApp (CName f) [CType f] [CExp f]
- | CBinOp COp (CExp f) (CExp f)
- | CCast (CType f) (CExp f)
- | CAddr (CExp f)
- | CStar (CExp f)
- | CNew (CName f) [CExp f]
- | CTNew (CName f) [CType f] [CExp f]
- | CTNewI (CName f) (CName f) [CType f] [CExp f]
- | CEMacroApp (CName f) [CName f]
- | CEVerbatim String
- | CNull
- data CFunDecl (f :: Type -> Type) = CFunDecl (CType f) (CName f) [(CType f, CName f)]
- data CVarDecl (f :: Type -> Type) = CVarDecl (CType f) (CName f)
- data CQual = Inline
- data CStatement (f :: Type -> Type)
- = UsingNamespace Namespace
- | TypeDef (CType f) (CName f)
- | CExpSA (CExp f)
- | CDeclaration (CFunDecl f)
- | CDefinition (Maybe CQual) (CFunDecl f) [CStatement f]
- | CInit (CVarDecl f) (CExp f)
- | CReturn (CExp f)
- | CDelete (CExp f)
- | CMacroApp (CName f) [CName f]
- | CExtern [CStatement f]
- | Comment String
- | CEmptyLine
- | CVerbatim String
- data CMacro (f :: Type -> Type)
- = CRegular (CStatement f)
- | Include HeaderName
- | Pragma PragmaParam
- | Undef (CName f)
- | Define (CName f) [CName f] [CStatement f]
- | EmptyLine
- | Verbatim String
- data CBlock (f :: Type -> Type) = ExternC [CMacro f]
- renderPragmaParam :: PragmaParam -> String
- renderCType :: CType Identity -> String
- renderCExp :: CExp Identity -> String
- renderCQual :: CQual -> String
- renderCFDecl :: CFunDecl Identity -> String
- renderCVDecl :: CVarDecl Identity -> String
- renderCStmt :: CStatement Identity -> String
- renderCStmtInMacro :: CStatement Identity -> [String]
- renderCMacro :: CMacro Identity -> String
- renderBlock :: CBlock Identity -> String
Documentation
newtype HeaderName Source #
Instances
IsString HeaderName Source # | |
Defined in FFICXX.Runtime.CodeGen.Cxx fromString :: String -> HeaderName # | |
Show HeaderName Source # | |
Defined in FFICXX.Runtime.CodeGen.Cxx showsPrec :: Int -> HeaderName -> ShowS # show :: HeaderName -> String # showList :: [HeaderName] -> ShowS # | |
Eq HeaderName Source # | |
Defined in FFICXX.Runtime.CodeGen.Cxx (==) :: HeaderName -> HeaderName -> Bool # (/=) :: HeaderName -> HeaderName -> Bool # | |
Ord HeaderName Source # | |
Defined in FFICXX.Runtime.CodeGen.Cxx compare :: HeaderName -> HeaderName -> Ordering # (<) :: HeaderName -> HeaderName -> Bool # (<=) :: HeaderName -> HeaderName -> Bool # (>) :: HeaderName -> HeaderName -> Bool # (>=) :: HeaderName -> HeaderName -> Bool # max :: HeaderName -> HeaderName -> HeaderName # min :: HeaderName -> HeaderName -> HeaderName # | |
Hashable HeaderName Source # | |
Defined in FFICXX.Runtime.CodeGen.Cxx hashWithSalt :: Int -> HeaderName -> Int # hash :: HeaderName -> Int # |
data PragmaParam Source #
data CExp (f :: Type -> Type) Source #
CVar (CName f) | variable |
CApp (CExp f) [CExp f] | C function app: f(a1,a2,..) |
CTApp (CName f) [CType f] [CExp f] | template app : fT1,T2,..(a1,a2,..) |
CBinOp COp (CExp f) (CExp f) | binary operator: x |
CCast (CType f) (CExp f) | (type)exp |
CAddr (CExp f) | &(exp) |
CStar (CExp f) |
|
CNew (CName f) [CExp f] | new operator: new Cstr(a1,a2,...) |
CTNew (CName f) [CType f] [CExp f] | new operator for template class: new CstrT1,T2,..(a1,a2,..) |
CTNewI (CName f) (CName f) [CType f] [CExp f] | new operator for inner class of template class: new CstrT1,T2,..::inner(a1,a2,..) -- TODO: make a generalization |
CEMacroApp (CName f) [CName f] | macro function at expression level |
CEVerbatim String | verbatim |
CNull | empty C expression. (for convenience) |
data CStatement (f :: Type -> Type) Source #
UsingNamespace Namespace | using namespace namespace; |
TypeDef (CType f) (CName f) | typedef origtype newname; |
CExpSA (CExp f) | C expression standalone; |
CDeclaration (CFunDecl f) | function declaration; |
CDefinition (Maybe CQual) (CFunDecl f) [CStatement f] | function definition; |
CInit (CVarDecl f) (CExp f) | variable initialization; |
CReturn (CExp f) | return statement; |
CDelete (CExp f) | delete statement; |
CMacroApp (CName f) [CName f] | C Macro application at statement level (temporary) |
CExtern [CStatement f] | extern C {..} |
Comment String | comment |
CEmptyLine | for convenience |
CVerbatim String | temporary verbatim |
data CMacro (f :: Type -> Type) Source #
CRegular (CStatement f) | regular C++ statement |
Include HeaderName | #include "header" |
Pragma PragmaParam | #pragma |
Undef (CName f) | #undef name |
Define (CName f) [CName f] [CStatement f] | #define macro (type) definition |
EmptyLine | just for convenience |
Verbatim String | temporary verbatim |
renderCQual :: CQual -> String Source #
renderCStmt :: CStatement Identity -> String Source #
render CStatement in a regular environment
renderCStmtInMacro :: CStatement Identity -> [String] Source #
render CStatement in a macro definition environment