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

Maintainermainland@eecs.harvard.edu
Safe HaskellSafe-Infered

Language.C.Syntax

Description

 

Synopsis

Documentation

data Id Source

Constructors

Id String !SrcLoc 
AntiId String !SrcLoc 

Instances

Eq Id 
Data Id 
Ord Id 
Show Id 
Typeable Id 
Pretty Id 
Located Id 

data Storage Source

Constructors

Tauto !SrcLoc 
Tregister !SrcLoc 
Tstatic !SrcLoc 
Textern !SrcLoc 
TexternL String !SrcLoc 
Ttypedef !SrcLoc 

data TypeQual Source

Constructors

Tconst !SrcLoc 
Tvolatile !SrcLoc 
Tinline !SrcLoc 
Trestrict !SrcLoc 
TCUDAdevice !SrcLoc 
TCUDAglobal !SrcLoc 
TCUDAhost !SrcLoc 
TCUDAconstant !SrcLoc 
TCUDAshared !SrcLoc 
TCUDAnoinline !SrcLoc 
TCLprivate !SrcLoc 
TCLlocal !SrcLoc 
TCLglobal !SrcLoc 
TCLconstant !SrcLoc 
TCLreadonly !SrcLoc 
TCLwriteonly !SrcLoc 
TCLkernel !SrcLoc 

data Sign Source

Constructors

Tsigned !SrcLoc 
Tunsigned !SrcLoc 

Instances

data TypeSpec Source

Constructors

Tvoid !SrcLoc 
Tchar (Maybe Sign) !SrcLoc 
Tshort (Maybe Sign) !SrcLoc 
Tint (Maybe Sign) !SrcLoc 
Tlong (Maybe Sign) !SrcLoc 
Tlong_long (Maybe Sign) !SrcLoc 
Tfloat !SrcLoc 
Tdouble !SrcLoc 
Tlong_double !SrcLoc 
Tstruct (Maybe Id) (Maybe [FieldGroup]) [Attr] !SrcLoc 
Tunion (Maybe Id) (Maybe [FieldGroup]) [Attr] !SrcLoc 
Tenum (Maybe Id) [CEnum] [Attr] !SrcLoc 
Tnamed Id !SrcLoc 
TtypeofExp Exp !SrcLoc 
TtypeofType Type !SrcLoc 
Tva_list !SrcLoc 

data ArraySize Source

There are two types of declarators in C, regular declarators and abstract declarators. The former is for declaring variables, function parameters, typedefs, etc. and the latter for abstract types---typedef int ({*}foo)(void) vs. tt int ({*})(void). The difference between the two is just whether or not an identifier is attached to the declarator. We therefore only define one Decl type and use it for both cases.

Constructors

ArraySize Bool Exp !SrcLoc 
VariableArraySize !SrcLoc 
NoArraySize !SrcLoc 

data Decl Source

Constructors

DeclRoot !SrcLoc 
Ptr [TypeQual] Decl !SrcLoc 
Array [TypeQual] ArraySize Decl !SrcLoc 
Proto Decl Params !SrcLoc 
OldProto Decl [Id] !SrcLoc 
AntiTypeDecl String !SrcLoc 

Instances

data Type Source

Constructors

Type DeclSpec Decl !SrcLoc 
AntiType String !SrcLoc 

Instances

data Init Source

Constructors

Init Id Decl (Maybe AsmLabel) (Maybe Initializer) [Attr] !SrcLoc 

Instances

data Field Source

Constructors

Field (Maybe Id) (Maybe Decl) (Maybe Exp) !SrcLoc 

data CEnum Source

Constructors

CEnum Id (Maybe Exp) !SrcLoc 
AntiEnum String !SrcLoc 
AntiEnums String !SrcLoc 

data Attr Source

Constructors

Attr Id [Exp] !SrcLoc 

Instances

data Param Source

Constructors

Param (Maybe Id) DeclSpec Decl !SrcLoc 
AntiParam String !SrcLoc 
AntiParams String !SrcLoc 

data Params Source

Constructors

Params [Param] Bool !SrcLoc 

data Func Source

Constructors

Func DeclSpec Id Decl Params [BlockItem] !SrcLoc 
OldFunc DeclSpec Id Decl [Id] (Maybe [InitGroup]) [BlockItem] !SrcLoc 

Instances

data Stm Source

Constructors

Label Id Stm !SrcLoc 
Case Exp Stm !SrcLoc 
Default Stm !SrcLoc 
Exp (Maybe Exp) !SrcLoc 
Block [BlockItem] !SrcLoc 
If Exp Stm (Maybe Stm) !SrcLoc 
Switch Exp Stm !SrcLoc 
While Exp Stm !SrcLoc 
DoWhile Stm Exp !SrcLoc 
For (Either InitGroup (Maybe Exp)) (Maybe Exp) (Maybe Exp) Stm !SrcLoc 
Goto Id !SrcLoc 
Continue !SrcLoc 
Break !SrcLoc 
Return (Maybe Exp) !SrcLoc 
Asm Bool [Attr] [String] [(String, Exp)] [(String, Exp)] [String] !SrcLoc 
AntiStm String !SrcLoc 
AntiStms String !SrcLoc 

Instances

data Exp Source

Constructors

Var Id !SrcLoc 
Const Const !SrcLoc 
BinOp BinOp Exp Exp !SrcLoc 
Assign Exp AssignOp Exp !SrcLoc 
PreInc Exp !SrcLoc 
PostInc Exp !SrcLoc 
PreDec Exp !SrcLoc 
PostDec Exp !SrcLoc 
UnOp UnOp Exp !SrcLoc 
SizeofExp Exp !SrcLoc 
SizeofType Type !SrcLoc 
Cast Type Exp !SrcLoc 
Cond Exp Exp Exp !SrcLoc 
Member Exp Id !SrcLoc 
PtrMember Exp Id !SrcLoc 
Index Exp Exp !SrcLoc 
FnCall Exp [Exp] !SrcLoc 
CudaCall Exp ExeConfig [Exp] !SrcLoc 
Seq Exp Exp !SrcLoc 
CompoundLit Type [(Maybe Designation, Initializer)] !SrcLoc 
StmExpr [BlockItem] !SrcLoc 
BuiltinVaArg Exp Type !SrcLoc 
AntiExp String !SrcLoc 
AntiArgs String !SrcLoc