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-Inferred |
Language | Haskell2010 |
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 #
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 # | |
Defined in Language.Hakaru.CodeGen.AST (==) :: Preprocessor -> Preprocessor -> Bool # (/=) :: Preprocessor -> Preprocessor -> Bool # | |
Ord Preprocessor Source # | |
Defined in Language.Hakaru.CodeGen.AST 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 # | |
Defined in Language.Hakaru.CodeGen.AST showsPrec :: Int -> Preprocessor -> ShowS # show :: Preprocessor -> String # showList :: [Preprocessor] -> ShowS # | |
Pretty Preprocessor Source # | |
Defined in Language.Hakaru.CodeGen.Pretty pretty :: Preprocessor -> Doc Source # prettyPrec :: Int -> Preprocessor -> Doc |
data CStorageSpec Source #
Instances
Eq CStorageSpec Source # | |
Defined in Language.Hakaru.CodeGen.AST (==) :: CStorageSpec -> CStorageSpec -> Bool # (/=) :: CStorageSpec -> CStorageSpec -> Bool # | |
Ord CStorageSpec Source # | |
Defined in Language.Hakaru.CodeGen.AST 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 # | |
Defined in Language.Hakaru.CodeGen.AST showsPrec :: Int -> CStorageSpec -> ShowS # show :: CStorageSpec -> String # showList :: [CStorageSpec] -> ShowS # | |
Pretty CStorageSpec Source # | |
Defined in Language.Hakaru.CodeGen.Pretty pretty :: CStorageSpec -> Doc Source # prettyPrec :: Int -> CStorageSpec -> Doc |
data CDirectDeclr Source #
CDDeclrIdent Ident | |
CDDeclrArr CDirectDeclr (Maybe CExpr) | |
CDDeclrFun CDirectDeclr [[CTypeSpec]] | |
CDDeclrRec CDeclr |
Instances
Eq CDirectDeclr Source # | |
Defined in Language.Hakaru.CodeGen.AST (==) :: CDirectDeclr -> CDirectDeclr -> Bool # (/=) :: CDirectDeclr -> CDirectDeclr -> Bool # | |
Ord CDirectDeclr Source # | |
Defined in Language.Hakaru.CodeGen.AST 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 # | |
Defined in Language.Hakaru.CodeGen.AST showsPrec :: Int -> CDirectDeclr -> ShowS # show :: CDirectDeclr -> String # showList :: [CDirectDeclr] -> ShowS # | |
Pretty CDirectDeclr Source # | |
Defined in Language.Hakaru.CodeGen.Pretty pretty :: CDirectDeclr -> Doc Source # prettyPrec :: Int -> CDirectDeclr -> Doc |
CVoid | |
CChar | |
CShort | |
CInt | |
CLong | |
CFloat | |
CDouble | |
CSigned | |
CUnsigned | |
CSUType CSUSpec | |
CTypeDefType Ident | |
CEnumType CEnum |
CInitExpr CExpr | |
CInitList [([CPartDesig], CInit)] |
data CPartDesig Source #
Instances
Eq CPartDesig Source # | |
Defined in Language.Hakaru.CodeGen.AST (==) :: CPartDesig -> CPartDesig -> Bool # (/=) :: CPartDesig -> CPartDesig -> Bool # | |
Ord CPartDesig Source # | |
Defined in Language.Hakaru.CodeGen.AST 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 # | |
Defined in Language.Hakaru.CodeGen.AST showsPrec :: Int -> CPartDesig -> ShowS # show :: CPartDesig -> String # showList :: [CPartDesig] -> ShowS # | |
Pretty CPartDesig Source # | |
Defined in Language.Hakaru.CodeGen.Pretty pretty :: CPartDesig -> Doc Source # prettyPrec :: Int -> CPartDesig -> Doc |
data CCompoundBlockItem Source #
Instances
CMulOp | |
CDivOp | |
CRmdOp | |
CAddOp | |
CSubOp | |
CShlOp | |
CShrOp | |
CLeOp | |
CGrOp | |
CLeqOp | |
CGeqOp | |
CEqOp | |
CNeqOp | |
CAndOp | |
CXorOp | |
COrOp | |
CLndOp | |
CLorOp |
CAssignOp | |
CMulAssOp | |
CDivAssOp | |
CRmdAssOp | |
CAddAssOp | |
CSubAssOp | |
CShlAssOp | |
CShrAssOp | |
CAndAssOp | |
CXorAssOp | |
COrAssOp |
cNameStream :: [String] Source #