fficxx-runtime-0.6: Runtime for fficxx-generated library
Safe HaskellNone
LanguageHaskell2010

FFICXX.Runtime.CodeGen.Cxx

Synopsis

Documentation

newtype Namespace Source #

Constructors

NS 

Fields

data PragmaParam Source #

Constructors

Once 

newtype NamePart (f :: * -> *) Source #

parts for interpolation

Constructors

NamePart String 

newtype CName (f :: * -> *) Source #

Constructors

CName [NamePart f] 

data CType (f :: * -> *) Source #

Types

Constructors

CTVoid 
CTSimple (CName f) 
CTStar (CType f) 
CTAuto 
CTTApp 

Fields

  • (CName f)

    template type name

  • [CType f]

    template parameters

CTConst (CType f) 
CTScoped (CType f) (CType f) 
CTVerbatim String 

data COp Source #

Operators

Constructors

CArrow 
CAssign 

data CExp (f :: * -> *) Source #

Constructors

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 op y

CCast (CType f) (CExp f)

(type)exp

CAddr (CExp f)

&(exp)

CStar (CExp f)
  • (exp)
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 CFunDecl (f :: * -> *) Source #

Constructors

CFunDecl (CType f) (CName f) [(CType f, CName f)]

type func( type1 arg1, type2 arg2, ... )

data CVarDecl (f :: * -> *) Source #

Constructors

CVarDecl 

Fields

data CQual Source #

Constructors

Inline 

data CStatement (f :: * -> *) Source #

Constructors

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 :: * -> *) Source #

Constructors

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

data CBlock (f :: * -> *) Source #

Constructors

ExternC [CMacro f] 

renderCStmt :: CStatement Identity -> String Source #

render CStatement in a regular environment

renderCStmtInMacro :: CStatement Identity -> [String] Source #

render CStatement in a macro definition environment