-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | C-like AST to simplify writing C99 programs.
--   
--   This package is a wrapper on top of 'language-c99'. It provides a
--   simpler interface more suited for writing C99 programs. It achieves
--   this by implementing its own C-like AST, supporting the most used C
--   features. In turn, this AST is translated into actual C99 one, showing
--   that it is an actual subset.
@package language-c99-simple
@version 0.3.0

module Language.C99.Simple.AST
type Ident = String
data TransUnit
TransUnit :: [Decln] -> [FunDef] -> TransUnit
data FunDef
FunDef :: Maybe StorageSpec -> Type -> Ident -> [Param] -> [Decln] -> [Stmt] -> FunDef
data Param
Param :: Type -> Ident -> Param
data Decln
VarDecln :: Maybe StorageSpec -> Type -> Ident -> Maybe Init -> Decln
FunDecln :: Maybe StorageSpec -> Type -> Ident -> [Param] -> Decln
TypeDecln :: Type -> Decln
data StorageSpec
Typedef :: StorageSpec
Extern :: StorageSpec
Static :: StorageSpec
Auto :: StorageSpec
Register :: StorageSpec
data Type
Type :: Type -> Type
TypeSpec :: TypeSpec -> Type
Ptr :: Type -> Type
Array :: Type -> Maybe Expr -> Type
Const :: Type -> Type
Restrict :: Type -> Type
Volatile :: Type -> Type
data TypeSpec
Void :: TypeSpec
Char :: TypeSpec
Signed_Char :: TypeSpec
Unsigned_Char :: TypeSpec
Short :: TypeSpec
Signed_Short :: TypeSpec
Short_Int :: TypeSpec
Signed_Short_Int :: TypeSpec
Unsigned_Short :: TypeSpec
Unsigned_Short_Int :: TypeSpec
Int :: TypeSpec
Signed :: TypeSpec
Signed_Int :: TypeSpec
Unsigned :: TypeSpec
Unsigned_Int :: TypeSpec
Long :: TypeSpec
Signed_Long :: TypeSpec
Long_Int :: TypeSpec
Signed_Long_Int :: TypeSpec
Unsigned_Long :: TypeSpec
Unsgined_Long_Int :: TypeSpec
Long_Long :: TypeSpec
Signed_Long_Long :: TypeSpec
Long_Long_Int :: TypeSpec
Signed_Long_Long_Int :: TypeSpec
Unsigned_Long_Long :: TypeSpec
Unsigned_Long_Long_Int :: TypeSpec
Float :: TypeSpec
Double :: TypeSpec
Long_Double :: TypeSpec
Bool :: TypeSpec
Float_Complex :: TypeSpec
Double_Complex :: TypeSpec
Long_Double_Complex :: TypeSpec
TypedefName :: Ident -> TypeSpec
Struct :: Ident -> TypeSpec
StructDecln :: Maybe Ident -> NonEmpty FieldDecln -> TypeSpec
Union :: Ident -> TypeSpec
UnionDecln :: Maybe Ident -> NonEmpty FieldDecln -> TypeSpec
Enum :: Ident -> TypeSpec
EnumDecln :: Maybe Ident -> NonEmpty Ident -> TypeSpec
data FieldDecln
FieldDecln :: Type -> Ident -> FieldDecln
data Init
InitExpr :: Expr -> Init
InitList :: NonEmpty InitItem -> Init
data InitItem
InitItem :: Maybe Ident -> Init -> InitItem
data Expr
Ident :: Ident -> Expr
LitBool :: Bool -> Expr
LitInt :: Integer -> Expr
LitFloat :: Float -> Expr
LitDouble :: Double -> Expr
LitString :: String -> Expr
Index :: Expr -> Expr -> Expr
Funcall :: Expr -> [Expr] -> Expr
Dot :: Expr -> Ident -> Expr
Arrow :: Expr -> Ident -> Expr
InitVal :: TypeName -> NonEmpty InitItem -> Expr
UnaryOp :: UnaryOp -> Expr -> Expr
Cast :: TypeName -> Expr -> Expr
BinaryOp :: BinaryOp -> Expr -> Expr -> Expr
Cond :: Expr -> Expr -> Expr -> Expr
AssignOp :: AssignOp -> Expr -> Expr -> Expr
SizeOf :: Expr -> Expr
SizeOfType :: TypeName -> Expr
data UnaryOp
Inc :: UnaryOp
Dec :: UnaryOp
Ref :: UnaryOp
DeRef :: UnaryOp
Plus :: UnaryOp
Min :: UnaryOp
BoolNot :: UnaryOp
Not :: UnaryOp
data BinaryOp
Mult :: BinaryOp
Div :: BinaryOp
Mod :: BinaryOp
Add :: BinaryOp
Sub :: BinaryOp
ShiftL :: BinaryOp
ShiftR :: BinaryOp
LT :: BinaryOp
GT :: BinaryOp
LE :: BinaryOp
GE :: BinaryOp
Eq :: BinaryOp
NEq :: BinaryOp
And :: BinaryOp
XOr :: BinaryOp
Or :: BinaryOp
LAnd :: BinaryOp
LOr :: BinaryOp
data AssignOp
Assign :: AssignOp
AssignMult :: AssignOp
AssignDiv :: AssignOp
AssignMod :: AssignOp
AssignAdd :: AssignOp
AssignSub :: AssignOp
AssignShiftL :: AssignOp
AssignShiftR :: AssignOp
AssignAnd :: AssignOp
AssignXOr :: AssignOp
AssignOr :: AssignOp
data TypeName
TypeName :: Type -> TypeName
data Case
Case :: Expr -> Stmt -> Case
Default :: Stmt -> Case
data Stmt
Expr :: Expr -> Stmt
If :: Expr -> [Stmt] -> Stmt
IfElse :: Expr -> [Stmt] -> [Stmt] -> Stmt
Switch :: Expr -> [Case] -> Stmt
While :: Expr -> [Stmt] -> Stmt
For :: Expr -> Expr -> Expr -> [Stmt] -> Stmt
ForInf :: [Stmt] -> Stmt
Continue :: Stmt
Break :: Stmt
Label :: String -> Stmt -> Stmt
Return :: Maybe Expr -> Stmt

module Language.C99.Simple.Expr
(.++) :: Expr -> Expr
(.--) :: Expr -> Expr
ref :: Expr -> Expr
deref :: Expr -> Expr
pos :: Expr -> Expr
neg :: Expr -> Expr
(.~) :: Expr -> Expr
(.!) :: Expr -> Expr
(.*) :: Expr -> Expr -> Expr
(./) :: Expr -> Expr -> Expr
(.%) :: Expr -> Expr -> Expr
(.+) :: Expr -> Expr -> Expr
(.-) :: Expr -> Expr -> Expr
(.<<) :: Expr -> Expr -> Expr
(.>>) :: Expr -> Expr -> Expr
(.<) :: Expr -> Expr -> Expr
(.>) :: Expr -> Expr -> Expr
(.<=) :: Expr -> Expr -> Expr
(.>=) :: Expr -> Expr -> Expr
(.==) :: Expr -> Expr -> Expr
(.!=) :: Expr -> Expr -> Expr
(.&) :: Expr -> Expr -> Expr
(.^) :: Expr -> Expr -> Expr
(.|) :: Expr -> Expr -> Expr
(.&&) :: Expr -> Expr -> Expr
(.||) :: Expr -> Expr -> Expr
(.=) :: Expr -> Expr -> Expr
(.*=) :: Expr -> Expr -> Expr
(./=) :: Expr -> Expr -> Expr
(.%=) :: Expr -> Expr -> Expr
(.+=) :: Expr -> Expr -> Expr
(.-=) :: Expr -> Expr -> Expr
(.<<=) :: Expr -> Expr -> Expr
(.>>=) :: Expr -> Expr -> Expr
(.&=) :: Expr -> Expr -> Expr
(.^=) :: Expr -> Expr -> Expr
(.|=) :: Expr -> Expr -> Expr

module Language.C99.Simple.Util
appendspecs :: DeclnSpecs -> DeclnSpecs -> DeclnSpecs
insertptr :: Ptr -> Declr -> Declr
appendptr :: Ptr -> Ptr -> Ptr
gettypequals :: Type -> (Maybe TypeQualList, Type)
declrarray :: Declr -> Maybe AssignExpr -> Declr
foldtypespecs :: [TypeSpec] -> DeclnSpecs
foldtypequals :: [TypeSpec] -> SpecQualList
decay :: Type -> Type

module Language.C99.Simple.Translate
translate :: TransUnit -> TransUnit
transtransunit :: TransUnit -> TransUnit
transfundef :: FunDef -> FunDef
transdecln :: Decln -> Decln
transparamdecln :: Param -> ParamDecln
transparam :: Param -> Decln
getdeclr :: Type -> State Declr ()
getdeclnspecs :: Maybe StorageSpec -> Type -> DeclnSpecs
transstorespec :: StorageSpec -> StorageClassSpec
spec2spec :: TypeSpec -> [TypeSpec]
transfielddeclns :: NonEmpty FieldDecln -> StructDeclnList
transfielddecln :: FieldDecln -> StructDecln
transvariantdeclns :: NonEmpty Ident -> EnumrList
transvariantdecln :: Ident -> Enumr
getspecquals :: Type -> SpecQualList
transexpr :: Expr -> Expr
unaryop :: UnaryOp -> Expr -> UnaryExpr
binaryop :: BinaryOp -> Expr -> Expr -> Expr
assignop :: AssignOp -> Expr -> Expr -> AssignExpr
transinit :: Init -> Init
transinitlist :: NonEmpty InitItem -> InitList
transdesigr :: Ident -> Design
initexpr :: TypeName -> NonEmpty InitItem -> PostfixExpr
transinititems :: NonEmpty InitItem -> InitList
indexexpr :: Expr -> Expr -> PostfixExpr
dotexpr :: Expr -> String -> PostfixExpr
arrowexpr :: Expr -> String -> PostfixExpr
castexpr :: TypeName -> Expr -> CastExpr
funcall :: Expr -> [Expr] -> PostfixExpr
condexpr :: Expr -> Expr -> Expr -> CondExpr
transtypename :: TypeName -> TypeName
getabstractdeclr :: Type -> State (Maybe AbstractDeclr) ()
transstmt :: Stmt -> Stmt
exprstmt :: Expr -> Stmt
ifstmt :: Expr -> [Stmt] -> Stmt
ifelsestmt :: Expr -> [Stmt] -> [Stmt] -> Stmt
switchstmt :: Expr -> [Case] -> Stmt
whilestmt :: Expr -> [Stmt] -> Stmt
forstmt :: Maybe Expr -> Maybe Expr -> Maybe Expr -> [Stmt] -> Stmt
labelstmt :: String -> Stmt -> Stmt
returnstmt :: Maybe Expr -> Stmt
casestmt :: [Case] -> Stmt
compound :: [Decln] -> [Stmt] -> CompoundStmt
compoundstmt :: [Decln] -> [Stmt] -> Stmt
fundirectdeclr :: Ident -> [Param] -> DirectDeclr

module Language.C99.Simple
