| Copyright | Copyright (c) 2016 the Hakaru team |
|---|---|
| License | BSD3 |
| Maintainer | zsulliva@indiana.edu |
| Stability | experimental |
| Portability | GHC-only An AST for the C Family and preprocessor. Much of this was originally based |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Language.Hakaru.CodeGen.AST
Description
on Manuel M T Chakravarty and Benedikt Hubar's "language-c" package.
It is an AST for the C99 standard and should compile with the -pedantic flag
Documentation
data Preprocessor Source #
Constructors
| PPDefine String String | |
| PPInclude String | |
| PPUndef String | |
| PPIf String | |
| PPIfDef String | |
| PPIfNDef String | |
| PPElse String | |
| PPElif String | |
| PPEndif String | |
| PPError String | |
| PPPragma [String] |
Instances
| Eq Preprocessor Source # | |
| Ord Preprocessor Source # | |
Methods compare :: Preprocessor -> Preprocessor -> Ordering # (<) :: Preprocessor -> Preprocessor -> Bool # (<=) :: Preprocessor -> Preprocessor -> Bool # (>) :: Preprocessor -> Preprocessor -> Bool # (>=) :: Preprocessor -> Preprocessor -> Bool # max :: Preprocessor -> Preprocessor -> Preprocessor # min :: Preprocessor -> Preprocessor -> Preprocessor # | |
| Show Preprocessor Source # | |
Methods showsPrec :: Int -> Preprocessor -> ShowS # show :: Preprocessor -> String # showList :: [Preprocessor] -> ShowS # | |
| Pretty Preprocessor Source # | |
Constructors
| CDeclExt CDecl | |
| CFunDefExt CFunDef | |
| CCommentExt String | |
| CPPExt Preprocessor |
Constructors
| CDeclr (Maybe CPtrDeclr) CDirectDeclr |
Constructors
| CStorageSpec CStorageSpec | |
| CTypeSpec CTypeSpec | |
| CTypeQual CTypeQual | |
| CFunSpec CFunSpec |
Instances
| Eq CDeclSpec Source # | |
| Ord CDeclSpec Source # | |
| Show CDeclSpec Source # | |
| Pretty CDeclSpec Source # | |
data CStorageSpec Source #
Instances
| Eq CStorageSpec Source # | |
| Ord CStorageSpec Source # | |
Methods compare :: CStorageSpec -> CStorageSpec -> Ordering # (<) :: CStorageSpec -> CStorageSpec -> Bool # (<=) :: CStorageSpec -> CStorageSpec -> Bool # (>) :: CStorageSpec -> CStorageSpec -> Bool # (>=) :: CStorageSpec -> CStorageSpec -> Bool # max :: CStorageSpec -> CStorageSpec -> CStorageSpec # min :: CStorageSpec -> CStorageSpec -> CStorageSpec # | |
| Show CStorageSpec Source # | |
Methods showsPrec :: Int -> CStorageSpec -> ShowS # show :: CStorageSpec -> String # showList :: [CStorageSpec] -> ShowS # | |
| Pretty CStorageSpec Source # | |
Constructors
| CConstQual | |
| CVolatQual |
Instances
| Eq CTypeQual Source # | |
| Ord CTypeQual Source # | |
| Show CTypeQual Source # | |
| Pretty CTypeQual Source # | |
data CDirectDeclr Source #
Constructors
| CDDeclrIdent Ident | |
| CDDeclrArr CDirectDeclr (Maybe CExpr) | |
| CDDeclrFun CDirectDeclr [[CTypeSpec]] | |
| CDDeclrRec CDeclr |
Instances
| Eq CDirectDeclr Source # | |
| Ord CDirectDeclr Source # | |
Methods compare :: CDirectDeclr -> CDirectDeclr -> Ordering # (<) :: CDirectDeclr -> CDirectDeclr -> Bool # (<=) :: CDirectDeclr -> CDirectDeclr -> Bool # (>) :: CDirectDeclr -> CDirectDeclr -> Bool # (>=) :: CDirectDeclr -> CDirectDeclr -> Bool # max :: CDirectDeclr -> CDirectDeclr -> CDirectDeclr # min :: CDirectDeclr -> CDirectDeclr -> CDirectDeclr # | |
| Show CDirectDeclr Source # | |
Methods showsPrec :: Int -> CDirectDeclr -> ShowS # show :: CDirectDeclr -> String # showList :: [CDirectDeclr] -> ShowS # | |
| Pretty CDirectDeclr Source # | |
Constructors
| CVoid | |
| CChar | |
| CShort | |
| CInt | |
| CLong | |
| CFloat | |
| CDouble | |
| CSigned | |
| CUnsigned | |
| CSUType CSUSpec | |
| CTypeDefType Ident | |
| CEnumType CEnum |
Instances
| Eq CTypeSpec Source # | |
| Ord CTypeSpec Source # | |
| Show CTypeSpec Source # | |
| Pretty CTypeSpec Source # | |
Instances
| Eq CTypeName Source # | |
| Ord CTypeName Source # | |
| Show CTypeName Source # | |
| Pretty CTypeName Source # | |
Constructors
| CStructTag | |
| CUnionTag |
Constructors
| CInitExpr CExpr | |
| CInitList [([CPartDesig], CInit)] |
data CPartDesig Source #
Constructors
| CArrDesig CExpr | |
| CMemberDesig CExpr |
Instances
| Eq CPartDesig Source # | |
| Ord CPartDesig Source # | |
Methods compare :: CPartDesig -> CPartDesig -> Ordering # (<) :: CPartDesig -> CPartDesig -> Bool # (<=) :: CPartDesig -> CPartDesig -> Bool # (>) :: CPartDesig -> CPartDesig -> Bool # (>=) :: CPartDesig -> CPartDesig -> Bool # max :: CPartDesig -> CPartDesig -> CPartDesig # min :: CPartDesig -> CPartDesig -> CPartDesig # | |
| Show CPartDesig Source # | |
Methods showsPrec :: Int -> CPartDesig -> ShowS # show :: CPartDesig -> String # showList :: [CPartDesig] -> ShowS # | |
| Pretty CPartDesig Source # | |
Instances
| Eq CPtrDeclr Source # | |
| Ord CPtrDeclr Source # | |
| Show CPtrDeclr Source # | |
| Pretty CPtrDeclr Source # | |
Constructors
data CCompoundBlockItem Source #
Constructors
| CBlockStat CStat | |
| CBlockDecl CDecl |
Instances
| Eq CCompoundBlockItem Source # | |
Methods (==) :: CCompoundBlockItem -> CCompoundBlockItem -> Bool # (/=) :: CCompoundBlockItem -> CCompoundBlockItem -> Bool # | |
| Ord CCompoundBlockItem Source # | |
Methods compare :: CCompoundBlockItem -> CCompoundBlockItem -> Ordering # (<) :: CCompoundBlockItem -> CCompoundBlockItem -> Bool # (<=) :: CCompoundBlockItem -> CCompoundBlockItem -> Bool # (>) :: CCompoundBlockItem -> CCompoundBlockItem -> Bool # (>=) :: CCompoundBlockItem -> CCompoundBlockItem -> Bool # max :: CCompoundBlockItem -> CCompoundBlockItem -> CCompoundBlockItem # min :: CCompoundBlockItem -> CCompoundBlockItem -> CCompoundBlockItem # | |
| Show CCompoundBlockItem Source # | |
Methods showsPrec :: Int -> CCompoundBlockItem -> ShowS # show :: CCompoundBlockItem -> String # showList :: [CCompoundBlockItem] -> ShowS # | |
| Pretty CCompoundBlockItem Source # | |
Constructors
Constructors
| CIntConst Integer | |
| CCharConst Char | |
| CFloatConst Float | |
| CStringConst String |
Constructors
| CPreIncOp | |
| CPreDecOp | |
| CPostIncOp | |
| CPostDecOp | |
| CAdrOp | |
| CIndOp | |
| CPlusOp | |
| CMinOp | |
| CCompOp | |
| CNegOp |
Constructors
| CMulOp | |
| CDivOp | |
| CRmdOp | |
| CAddOp | |
| CSubOp | |
| CShlOp | |
| CShrOp | |
| CLeOp | |
| CGrOp | |
| CLeqOp | |
| CGeqOp | |
| CEqOp | |
| CNeqOp | |
| CAndOp | |
| CXorOp | |
| COrOp | |
| CLndOp | |
| CLorOp |
Instances
| Eq CBinaryOp Source # | |
| Ord CBinaryOp Source # | |
| Show CBinaryOp Source # | |
| Pretty CBinaryOp Source # | |
Constructors
| CAssignOp | |
| CMulAssOp | |
| CDivAssOp | |
| CRmdAssOp | |
| CAddAssOp | |
| CSubAssOp | |
| CShlAssOp | |
| CShrAssOp | |
| CAndAssOp | |
| CXorAssOp | |
| COrAssOp |
Instances
| Eq CAssignOp Source # | |
| Ord CAssignOp Source # | |
| Show CAssignOp Source # | |
| Pretty CAssignOp Source # | |
cNameStream :: [String] Source #