language-c-0.8.3: Analysis and generation of C code
Copyright(c) [1999..2007] Manuel M T Chakravarty
(c) 2008 Benedikt Huber
LicenseBSD-style
Maintainerbenedikt.huber@gmail.com
Stabilityexperimental
Portabilityghc
Safe HaskellNone
LanguageHaskell98

Language.C.Syntax.AST

Description

Abstract syntax of C source and header files.

The tree structure is based on the grammar in Appendix A of K&R. The abstract syntax simplifies the concrete syntax by merging similar concrete constructs into a single type of abstract tree structure: declarations are merged with structure declarations, parameter declarations and type names, and declarators are merged with abstract declarators.

With K&R we refer to ``The C Programming Language'', second edition, Brain W. Kernighan and Dennis M. Ritchie, Prentice Hall, 1988. The AST supports all of C99 http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf and several GNU extensions http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html.

Synopsis

C translation units

type CTranslUnit = CTranslationUnit NodeInfo #

Complete C tranlsation unit (C99 6.9, K&R A10)

A complete C translation unit, for example representing a C header or source file. It consists of a list of external (i.e. toplevel) declarations.

type CExtDecl = CExternalDeclaration NodeInfo #

External C declaration (C99 6.9, K&R A10)

Either a toplevel declaration, function definition or external assembler.

data CTranslationUnit a #

Constructors

CTranslUnit [CExternalDeclaration a] a 

Instances

Instances details
Functor CTranslationUnit # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CTranslationUnit a -> CTranslationUnit b

(<$) :: a -> CTranslationUnit b -> CTranslationUnit a

Annotated CTranslationUnit # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CTranslationUnit a -> a #

amap :: (a -> a) -> CTranslationUnit a -> CTranslationUnit a #

Pretty CTranslUnit # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CTranslUnit -> Doc #

prettyPrec :: Int -> CTranslUnit -> Doc #

Data a => Data (CTranslationUnit a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CTranslationUnit a -> c (CTranslationUnit a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CTranslationUnit a)

toConstr :: CTranslationUnit a -> Constr

dataTypeOf :: CTranslationUnit a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CTranslationUnit a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CTranslationUnit a))

gmapT :: (forall b. Data b => b -> b) -> CTranslationUnit a -> CTranslationUnit a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CTranslationUnit a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CTranslationUnit a -> r

gmapQ :: (forall d. Data d => d -> u) -> CTranslationUnit a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CTranslationUnit a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CTranslationUnit a -> m (CTranslationUnit a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CTranslationUnit a -> m (CTranslationUnit a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CTranslationUnit a -> m (CTranslationUnit a)

Show a => Show (CTranslationUnit a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CTranslationUnit a -> ShowS

show :: CTranslationUnit a -> String

showList :: [CTranslationUnit a] -> ShowS

Generic (CTranslationUnit a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CTranslationUnit a) :: Type -> Type

Methods

from :: CTranslationUnit a -> Rep (CTranslationUnit a) x

to :: Rep (CTranslationUnit a) x -> CTranslationUnit a

NFData a => NFData (CTranslationUnit a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CTranslationUnit a -> ()

CNode t1 => Pos (CTranslationUnit t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CTranslationUnit t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CTranslationUnit # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CTranslationUnit :: k -> Type

Methods

from1 :: forall (a :: k). CTranslationUnit a -> Rep1 CTranslationUnit a

to1 :: forall (a :: k). Rep1 CTranslationUnit a -> CTranslationUnit a

type Rep (CTranslationUnit a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CTranslationUnit a) = D1 ('MetaData "CTranslationUnit" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CTranslUnit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CExternalDeclaration a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Rep1 CTranslationUnit # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CTranslationUnit = D1 ('MetaData "CTranslationUnit" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CTranslUnit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 CExternalDeclaration) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

data CExternalDeclaration a #

Instances

Instances details
Functor CExternalDeclaration # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CExternalDeclaration # 
Instance details

Defined in Language.C.Syntax.AST

Pretty CExtDecl # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CExtDecl -> Doc #

prettyPrec :: Int -> CExtDecl -> Doc #

Data a => Data (CExternalDeclaration a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CExternalDeclaration a -> c (CExternalDeclaration a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CExternalDeclaration a)

toConstr :: CExternalDeclaration a -> Constr

dataTypeOf :: CExternalDeclaration a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CExternalDeclaration a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CExternalDeclaration a))

gmapT :: (forall b. Data b => b -> b) -> CExternalDeclaration a -> CExternalDeclaration a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CExternalDeclaration a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CExternalDeclaration a -> r

gmapQ :: (forall d. Data d => d -> u) -> CExternalDeclaration a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CExternalDeclaration a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CExternalDeclaration a -> m (CExternalDeclaration a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CExternalDeclaration a -> m (CExternalDeclaration a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CExternalDeclaration a -> m (CExternalDeclaration a)

Show a => Show (CExternalDeclaration a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CExternalDeclaration a -> ShowS

show :: CExternalDeclaration a -> String

showList :: [CExternalDeclaration a] -> ShowS

Generic (CExternalDeclaration a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CExternalDeclaration a) :: Type -> Type

NFData a => NFData (CExternalDeclaration a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CExternalDeclaration a -> ()

CNode t1 => Pos (CExternalDeclaration t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CExternalDeclaration t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CExternalDeclaration # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CExternalDeclaration :: k -> Type

Methods

from1 :: forall (a :: k). CExternalDeclaration a -> Rep1 CExternalDeclaration a

to1 :: forall (a :: k). Rep1 CExternalDeclaration a -> CExternalDeclaration a

type Rep (CExternalDeclaration a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CExternalDeclaration a) = D1 ('MetaData "CExternalDeclaration" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CDeclExt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a))) :+: (C1 ('MetaCons "CFDefExt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CFunctionDef a))) :+: C1 ('MetaCons "CAsmExt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStringLiteral a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))
type Rep1 CExternalDeclaration # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CExternalDeclaration = D1 ('MetaData "CExternalDeclaration" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CDeclExt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CDeclaration)) :+: (C1 ('MetaCons "CFDefExt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CFunctionDef)) :+: C1 ('MetaCons "CAsmExt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CStringLiteral) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))

Declarations

type CFunDef = CFunctionDef NodeInfo #

C function definition (C99 6.9.1, K&R A10.1)

A function definition is of the form CFunDef specifiers declarator decllist? stmt.

  • specifiers are the type and storage-class specifiers of the function. The only storage-class specifiers allowed are extern and static.
  • The declarator must be such that the declared identifier has function type. The return type shall be void or an object type other than array type.
  • The optional declaration list decllist is for old-style function declarations.
  • The statement stmt is a compound statement.

type CDecl = CDeclaration NodeInfo #

C declarations (K&R A8, C99 6.7), including structure declarations, parameter declarations and type names.

A declaration is of the form CDecl specifiers init-declarator-list, where the form of the declarator list's elements depends on the kind of declaration:

1) Toplevel declarations (K&R A8, C99 6.7 declaration)

  • C99 requires that there is at least one specifier, though this is merely a syntactic restriction
  • at most one storage class specifier is allowed per declaration
  • the elements of the non-empty init-declarator-list are of the form (Just declr, init?, Nothing). The declarator declr has to be present and non-abstract and the initialization expression is optional.

2) Structure declarations (K&R A8.3, C99 6.7.2.1 struct-declaration)

Those are the declarations of a structure's members.

  • do not allow storage specifiers
  • in strict C99, the list of declarators has to be non-empty
  • the elements of init-declarator-list are either of the form (Just declr, Nothing, size?), representing a member with optional bit-field size, or of the form (Nothing, Nothing, Just size), for unnamed bitfields. declr has to be non-abstract.
  • no member of a structure shall have incomplete type

3) Parameter declarations (K&R A8.6.3, C99 6.7.5 parameter-declaration)

  • init-declarator-list must contain at most one triple of the form (Just declr, Nothing, Nothing), i.e. consist of a single declarator, which is allowed to be abstract (i.e. unnamed).

4) Type names (A8.8, C99 6.7.6)

  • do not allow storage specifiers
  • init-declarator-list must contain at most one triple of the form (Just declr, Nothing, Nothing). where declr is an abstract declarator (i.e. doesn't contain a declared identifier)

type CStructUnion = CStructureUnion NodeInfo #

C structure or union specifiers (K&R A8.3, C99 6.7.2.1)

CStruct tag identifier struct-decls c-attrs represents a struct or union specifier (depending on tag).

  • either identifier or the declaration list struct-decls (or both) have to be present.

Example: in struct foo x;, the identifier is present, in struct { int y; } x the declaration list, and in struct foo { int y; } x; both of them.

  • c-attrs is a list of attribute annotations associated with the struct or union specifier

type CEnum = CEnumeration NodeInfo #

C enumeration specifier (K&R A8.4, C99 6.7.2.2)

CEnum identifier enumerator-list attrs represent as enum specifier

  • Either the identifier or the enumerator-list (or both) have to be present.
  • If enumerator-list is present, it has to be non-empty.
  • The enumerator list is of the form (enumeration-constant, enumeration-value?), where the latter is an optional constant integral expression.
  • attrs is a list of attribute annotations associated with the enumeration specifier

data CFunctionDef a #

Instances

Instances details
Functor CFunctionDef # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CFunctionDef a -> CFunctionDef b

(<$) :: a -> CFunctionDef b -> CFunctionDef a

Annotated CFunctionDef # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CFunctionDef a -> a #

amap :: (a -> a) -> CFunctionDef a -> CFunctionDef a #

Pretty CFunDef # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CFunDef -> Doc #

prettyPrec :: Int -> CFunDef -> Doc #

Data a => Data (CFunctionDef a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CFunctionDef a -> c (CFunctionDef a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CFunctionDef a)

toConstr :: CFunctionDef a -> Constr

dataTypeOf :: CFunctionDef a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CFunctionDef a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CFunctionDef a))

gmapT :: (forall b. Data b => b -> b) -> CFunctionDef a -> CFunctionDef a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CFunctionDef a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CFunctionDef a -> r

gmapQ :: (forall d. Data d => d -> u) -> CFunctionDef a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CFunctionDef a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CFunctionDef a -> m (CFunctionDef a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CFunctionDef a -> m (CFunctionDef a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CFunctionDef a -> m (CFunctionDef a)

Show a => Show (CFunctionDef a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CFunctionDef a -> ShowS

show :: CFunctionDef a -> String

showList :: [CFunctionDef a] -> ShowS

Generic (CFunctionDef a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CFunctionDef a) :: Type -> Type

Methods

from :: CFunctionDef a -> Rep (CFunctionDef a) x

to :: Rep (CFunctionDef a) x -> CFunctionDef a

NFData a => NFData (CFunctionDef a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CFunctionDef a -> ()

CNode t1 => Pos (CFunctionDef t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CFunctionDef t1 -> Position #

CNode t1 => CNode (CFunctionDef t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CFunctionDef # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CFunctionDef :: k -> Type

Methods

from1 :: forall (a :: k). CFunctionDef a -> Rep1 CFunctionDef a

to1 :: forall (a :: k). Rep1 CFunctionDef a -> CFunctionDef a

type Rep (CFunctionDef a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CFunctionDef a) = D1 ('MetaData "CFunctionDef" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CFunDef" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CDeclarationSpecifier a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclarator a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CDeclaration a]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStatement a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))
type Rep1 CFunctionDef # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CFunctionDef = D1 ('MetaData "CFunctionDef" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CFunDef" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 CDeclarationSpecifier) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CDeclarator)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 CDeclaration) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CStatement) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))

data CDeclaration a #

Constructors

CDecl [CDeclarationSpecifier a] [(Maybe (CDeclarator a), Maybe (CInitializer a), Maybe (CExpression a))] a 
CStaticAssert (CExpression a) (CStringLiteral a) a 

Instances

Instances details
Functor CDeclaration # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CDeclaration a -> CDeclaration b

(<$) :: a -> CDeclaration b -> CDeclaration a

Annotated CDeclaration # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CDeclaration a -> a #

amap :: (a -> a) -> CDeclaration a -> CDeclaration a #

Pretty CDecl # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CDecl -> Doc #

prettyPrec :: Int -> CDecl -> Doc #

Data a => Data (CDeclaration a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CDeclaration a -> c (CDeclaration a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CDeclaration a)

toConstr :: CDeclaration a -> Constr

dataTypeOf :: CDeclaration a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CDeclaration a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CDeclaration a))

gmapT :: (forall b. Data b => b -> b) -> CDeclaration a -> CDeclaration a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CDeclaration a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CDeclaration a -> r

gmapQ :: (forall d. Data d => d -> u) -> CDeclaration a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CDeclaration a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CDeclaration a -> m (CDeclaration a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CDeclaration a -> m (CDeclaration a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CDeclaration a -> m (CDeclaration a)

Show a => Show (CDeclaration a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CDeclaration a -> ShowS

show :: CDeclaration a -> String

showList :: [CDeclaration a] -> ShowS

Generic (CDeclaration a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CDeclaration a) :: Type -> Type

Methods

from :: CDeclaration a -> Rep (CDeclaration a) x

to :: Rep (CDeclaration a) x -> CDeclaration a

NFData a => NFData (CDeclaration a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CDeclaration a -> ()

CNode t1 => Pos (CDeclaration t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CDeclaration t1 -> Position #

CNode t1 => CNode (CDeclaration t1) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CDeclaration a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CDeclaration a) = D1 ('MetaData "CDeclaration" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CDeclarationSpecifier a]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Maybe (CDeclarator a), Maybe (CInitializer a), Maybe (CExpression a))]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: C1 ('MetaCons "CStaticAssert" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStringLiteral a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))

data CStructTag #

A tag to determine wheter we refer to a struct or union, see CStructUnion.

Constructors

CStructTag 
CUnionTag 

Instances

Instances details
Eq CStructTag # 
Instance details

Defined in Language.C.Syntax.AST

Methods

(==) :: CStructTag -> CStructTag -> Bool

(/=) :: CStructTag -> CStructTag -> Bool

Data CStructTag # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CStructTag -> c CStructTag

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CStructTag

toConstr :: CStructTag -> Constr

dataTypeOf :: CStructTag -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CStructTag)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CStructTag)

gmapT :: (forall b. Data b => b -> b) -> CStructTag -> CStructTag

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CStructTag -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CStructTag -> r

gmapQ :: (forall d. Data d => d -> u) -> CStructTag -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CStructTag -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CStructTag -> m CStructTag

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CStructTag -> m CStructTag

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CStructTag -> m CStructTag

Show CStructTag # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CStructTag -> ShowS

show :: CStructTag -> String

showList :: [CStructTag] -> ShowS

Generic CStructTag # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep CStructTag :: Type -> Type

Methods

from :: CStructTag -> Rep CStructTag x

to :: Rep CStructTag x -> CStructTag

NFData CStructTag # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CStructTag -> ()

Pretty CStructTag # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CStructTag -> Doc #

prettyPrec :: Int -> CStructTag -> Doc #

type Rep CStructTag # 
Instance details

Defined in Language.C.Syntax.AST

type Rep CStructTag = D1 ('MetaData "CStructTag" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CStructTag" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CUnionTag" 'PrefixI 'False) (U1 :: Type -> Type))

data CStructureUnion a #

Constructors

CStruct CStructTag (Maybe Ident) (Maybe [CDeclaration a]) [CAttribute a] a 

Instances

Instances details
Functor CStructureUnion # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CStructureUnion a -> CStructureUnion b

(<$) :: a -> CStructureUnion b -> CStructureUnion a

Annotated CStructureUnion # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CStructureUnion a -> a #

amap :: (a -> a) -> CStructureUnion a -> CStructureUnion a #

Pretty CStructUnion # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CStructUnion -> Doc #

prettyPrec :: Int -> CStructUnion -> Doc #

Data a => Data (CStructureUnion a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CStructureUnion a -> c (CStructureUnion a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CStructureUnion a)

toConstr :: CStructureUnion a -> Constr

dataTypeOf :: CStructureUnion a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CStructureUnion a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CStructureUnion a))

gmapT :: (forall b. Data b => b -> b) -> CStructureUnion a -> CStructureUnion a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CStructureUnion a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CStructureUnion a -> r

gmapQ :: (forall d. Data d => d -> u) -> CStructureUnion a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CStructureUnion a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CStructureUnion a -> m (CStructureUnion a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CStructureUnion a -> m (CStructureUnion a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CStructureUnion a -> m (CStructureUnion a)

Show a => Show (CStructureUnion a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CStructureUnion a -> ShowS

show :: CStructureUnion a -> String

showList :: [CStructureUnion a] -> ShowS

Generic (CStructureUnion a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CStructureUnion a) :: Type -> Type

Methods

from :: CStructureUnion a -> Rep (CStructureUnion a) x

to :: Rep (CStructureUnion a) x -> CStructureUnion a

NFData a => NFData (CStructureUnion a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CStructureUnion a -> ()

CNode t1 => Pos (CStructureUnion t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CStructureUnion t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CStructureUnion # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CStructureUnion :: k -> Type

Methods

from1 :: forall (a :: k). CStructureUnion a -> Rep1 CStructureUnion a

to1 :: forall (a :: k). Rep1 CStructureUnion a -> CStructureUnion a

type Rep (CStructureUnion a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CStructureUnion a) = D1 ('MetaData "CStructureUnion" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CStruct" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CStructTag) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Ident))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [CDeclaration a])) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CAttribute a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))
type Rep1 CStructureUnion # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CStructureUnion = D1 ('MetaData "CStructureUnion" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CStruct" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CStructTag) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Ident))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Maybe :.: ([] :.: Rec1 CDeclaration)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 CAttribute) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))

data CEnumeration a #

Constructors

CEnum (Maybe Ident) (Maybe [(Ident, Maybe (CExpression a))]) [CAttribute a] a 

Instances

Instances details
Functor CEnumeration # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CEnumeration a -> CEnumeration b

(<$) :: a -> CEnumeration b -> CEnumeration a

Annotated CEnumeration # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CEnumeration a -> a #

amap :: (a -> a) -> CEnumeration a -> CEnumeration a #

Pretty CEnum # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CEnum -> Doc #

prettyPrec :: Int -> CEnum -> Doc #

Data a => Data (CEnumeration a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CEnumeration a -> c (CEnumeration a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CEnumeration a)

toConstr :: CEnumeration a -> Constr

dataTypeOf :: CEnumeration a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CEnumeration a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CEnumeration a))

gmapT :: (forall b. Data b => b -> b) -> CEnumeration a -> CEnumeration a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CEnumeration a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CEnumeration a -> r

gmapQ :: (forall d. Data d => d -> u) -> CEnumeration a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CEnumeration a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CEnumeration a -> m (CEnumeration a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CEnumeration a -> m (CEnumeration a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CEnumeration a -> m (CEnumeration a)

Show a => Show (CEnumeration a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CEnumeration a -> ShowS

show :: CEnumeration a -> String

showList :: [CEnumeration a] -> ShowS

Generic (CEnumeration a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CEnumeration a) :: Type -> Type

Methods

from :: CEnumeration a -> Rep (CEnumeration a) x

to :: Rep (CEnumeration a) x -> CEnumeration a

NFData a => NFData (CEnumeration a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CEnumeration a -> ()

CNode t1 => Pos (CEnumeration t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CEnumeration t1 -> Position #

CNode t1 => CNode (CEnumeration t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CEnumeration # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CEnumeration :: k -> Type

Methods

from1 :: forall (a :: k). CEnumeration a -> Rep1 CEnumeration a

to1 :: forall (a :: k). Rep1 CEnumeration a -> CEnumeration a

type Rep (CEnumeration a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CEnumeration a) = D1 ('MetaData "CEnumeration" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CEnum" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Ident)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [(Ident, Maybe (CExpression a))]))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CAttribute a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))
type Rep1 CEnumeration # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CEnumeration = D1 ('MetaData "CEnumeration" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CEnum" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Ident)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Maybe :.: ([] :.: ((,) Ident :.: (Maybe :.: Rec1 CExpression))))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 CAttribute) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))

Declaration attributes

type CDeclSpec = CDeclarationSpecifier NodeInfo #

C declaration specifiers and qualifiers

Declaration specifiers include at most one storage-class specifier (C99 6.7.1), type specifiers (6.7.2) and type qualifiers (6.7.3).

partitionDeclSpecs :: [CDeclarationSpecifier a] -> ([CStorageSpecifier a], [CAttribute a], [CTypeQualifier a], [CTypeSpecifier a], [CFunctionSpecifier a], [CAlignmentSpecifier a]) #

Separate the declaration specifiers

attribute of a declaration qualify declarations or declarators (but not types), and are therefore separated as well.

type CStorageSpec = CStorageSpecifier NodeInfo #

C storage class specifier (and typedefs) (K&R A8.1, C99 6.7.1)

type CTypeSpec = CTypeSpecifier NodeInfo #

C type specifier (K&R A8.2, C99 6.7.2)

Type specifiers are either basic types such as char or int, struct, union or enum specifiers or typedef names.

As a GNU extension, a typeof expression also is a type specifier.

isSUEDef :: CTypeSpecifier a -> Bool #

returns True if the given typespec is a struct, union or enum definition

type CTypeQual = CTypeQualifier NodeInfo #

C type qualifiers (K&R A8.2, C99 6.7.3) and attributes.

const, volatile and restrict type qualifiers Additionally, attribute annotations for declarations and declarators, and function specifiers

type CFunSpec = CFunctionSpecifier NodeInfo #

C function specifiers (C99 6.7.4)

function specifiers inline and _Noreturn

type CAlignSpec = CAlignmentSpecifier NodeInfo #

C alignment specifiers (C99 6.7.5)

type CAttr = CAttribute NodeInfo #

attribute annotations

Those are of the form CAttr attribute-name attribute-parameters, and serve as generic properties of some syntax tree elements.

data CFunctionSpecifier a #

Constructors

CInlineQual a 
CNoreturnQual a 

Instances

Instances details
Functor CFunctionSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CFunctionSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Pretty CFunSpec # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CFunSpec -> Doc #

prettyPrec :: Int -> CFunSpec -> Doc #

Data a => Data (CFunctionSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CFunctionSpecifier a -> c (CFunctionSpecifier a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CFunctionSpecifier a)

toConstr :: CFunctionSpecifier a -> Constr

dataTypeOf :: CFunctionSpecifier a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CFunctionSpecifier a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CFunctionSpecifier a))

gmapT :: (forall b. Data b => b -> b) -> CFunctionSpecifier a -> CFunctionSpecifier a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CFunctionSpecifier a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CFunctionSpecifier a -> r

gmapQ :: (forall d. Data d => d -> u) -> CFunctionSpecifier a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CFunctionSpecifier a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CFunctionSpecifier a -> m (CFunctionSpecifier a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CFunctionSpecifier a -> m (CFunctionSpecifier a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CFunctionSpecifier a -> m (CFunctionSpecifier a)

Show a => Show (CFunctionSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CFunctionSpecifier a -> ShowS

show :: CFunctionSpecifier a -> String

showList :: [CFunctionSpecifier a] -> ShowS

Generic (CFunctionSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CFunctionSpecifier a) :: Type -> Type

NFData a => NFData (CFunctionSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CFunctionSpecifier a -> ()

CNode t1 => Pos (CFunctionSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CFunctionSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CFunctionSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CFunctionSpecifier :: k -> Type

Methods

from1 :: forall (a :: k). CFunctionSpecifier a -> Rep1 CFunctionSpecifier a

to1 :: forall (a :: k). Rep1 CFunctionSpecifier a -> CFunctionSpecifier a

type Rep (CFunctionSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CFunctionSpecifier a) = D1 ('MetaData "CFunctionSpecifier" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CInlineQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CNoreturnQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Rep1 CFunctionSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CFunctionSpecifier = D1 ('MetaData "CFunctionSpecifier" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CInlineQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CNoreturnQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

data CDeclarationSpecifier a #

Constructors

CStorageSpec (CStorageSpecifier a)

storage-class specifier or typedef

CTypeSpec (CTypeSpecifier a)

type name

CTypeQual (CTypeQualifier a)

type qualifier

CFunSpec (CFunctionSpecifier a)

function specifier

CAlignSpec (CAlignmentSpecifier a)

alignment specifier

Instances

Instances details
Functor CDeclarationSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CDeclarationSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Pretty CDeclSpec # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CDeclSpec -> Doc #

prettyPrec :: Int -> CDeclSpec -> Doc #

Data a => Data (CDeclarationSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CDeclarationSpecifier a -> c (CDeclarationSpecifier a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CDeclarationSpecifier a)

toConstr :: CDeclarationSpecifier a -> Constr

dataTypeOf :: CDeclarationSpecifier a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CDeclarationSpecifier a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CDeclarationSpecifier a))

gmapT :: (forall b. Data b => b -> b) -> CDeclarationSpecifier a -> CDeclarationSpecifier a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CDeclarationSpecifier a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CDeclarationSpecifier a -> r

gmapQ :: (forall d. Data d => d -> u) -> CDeclarationSpecifier a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CDeclarationSpecifier a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CDeclarationSpecifier a -> m (CDeclarationSpecifier a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CDeclarationSpecifier a -> m (CDeclarationSpecifier a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CDeclarationSpecifier a -> m (CDeclarationSpecifier a)

Show a => Show (CDeclarationSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CDeclarationSpecifier a -> ShowS

show :: CDeclarationSpecifier a -> String

showList :: [CDeclarationSpecifier a] -> ShowS

Generic (CDeclarationSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CDeclarationSpecifier a) :: Type -> Type

NFData a => NFData (CDeclarationSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CDeclarationSpecifier a -> ()

CNode t1 => Pos (CDeclarationSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CDeclarationSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CDeclarationSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CDeclarationSpecifier :: k -> Type

Methods

from1 :: forall (a :: k). CDeclarationSpecifier a -> Rep1 CDeclarationSpecifier a

to1 :: forall (a :: k). Rep1 CDeclarationSpecifier a -> CDeclarationSpecifier a

type Rep (CDeclarationSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CDeclarationSpecifier a) = D1 ('MetaData "CDeclarationSpecifier" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) ((C1 ('MetaCons "CStorageSpec" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStorageSpecifier a))) :+: C1 ('MetaCons "CTypeSpec" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CTypeSpecifier a)))) :+: (C1 ('MetaCons "CTypeQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CTypeQualifier a))) :+: (C1 ('MetaCons "CFunSpec" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CFunctionSpecifier a))) :+: C1 ('MetaCons "CAlignSpec" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CAlignmentSpecifier a))))))
type Rep1 CDeclarationSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CDeclarationSpecifier = D1 ('MetaData "CDeclarationSpecifier" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) ((C1 ('MetaCons "CStorageSpec" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CStorageSpecifier)) :+: C1 ('MetaCons "CTypeSpec" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CTypeSpecifier))) :+: (C1 ('MetaCons "CTypeQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CTypeQualifier)) :+: (C1 ('MetaCons "CFunSpec" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CFunctionSpecifier)) :+: C1 ('MetaCons "CAlignSpec" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CAlignmentSpecifier)))))

data CStorageSpecifier a #

Constructors

CAuto a

auto

CRegister a

register

CStatic a

static

CExtern a

extern

CTypedef a

typedef

CThread a

C11/GNUC thread local storage

CClKernel a

OpenCL kernel function

CClGlobal a

OpenCL __global variable

CClLocal a

OpenCL __local variable

Instances

Instances details
Functor CStorageSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CStorageSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Pretty CStorageSpec # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CStorageSpec -> Doc #

prettyPrec :: Int -> CStorageSpec -> Doc #

Eq a => Eq (CStorageSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Data a => Data (CStorageSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CStorageSpecifier a -> c (CStorageSpecifier a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CStorageSpecifier a)

toConstr :: CStorageSpecifier a -> Constr

dataTypeOf :: CStorageSpecifier a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CStorageSpecifier a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CStorageSpecifier a))

gmapT :: (forall b. Data b => b -> b) -> CStorageSpecifier a -> CStorageSpecifier a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CStorageSpecifier a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CStorageSpecifier a -> r

gmapQ :: (forall d. Data d => d -> u) -> CStorageSpecifier a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CStorageSpecifier a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CStorageSpecifier a -> m (CStorageSpecifier a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CStorageSpecifier a -> m (CStorageSpecifier a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CStorageSpecifier a -> m (CStorageSpecifier a)

Ord a => Ord (CStorageSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Show a => Show (CStorageSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CStorageSpecifier a -> ShowS

show :: CStorageSpecifier a -> String

showList :: [CStorageSpecifier a] -> ShowS

Generic (CStorageSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CStorageSpecifier a) :: Type -> Type

NFData a => NFData (CStorageSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CStorageSpecifier a -> ()

CNode t1 => Pos (CStorageSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CStorageSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CStorageSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CStorageSpecifier :: k -> Type

Methods

from1 :: forall (a :: k). CStorageSpecifier a -> Rep1 CStorageSpecifier a

to1 :: forall (a :: k). Rep1 CStorageSpecifier a -> CStorageSpecifier a

type Rep (CStorageSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CStorageSpecifier a) = D1 ('MetaData "CStorageSpecifier" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (((C1 ('MetaCons "CAuto" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CRegister" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CStatic" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CExtern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))) :+: ((C1 ('MetaCons "CTypedef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CThread" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CClKernel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons "CClGlobal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CClLocal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))))
type Rep1 CStorageSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CStorageSpecifier = D1 ('MetaData "CStorageSpecifier" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (((C1 ('MetaCons "CAuto" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CRegister" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) :+: (C1 ('MetaCons "CStatic" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CExtern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))) :+: ((C1 ('MetaCons "CTypedef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CThread" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) :+: (C1 ('MetaCons "CClKernel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: (C1 ('MetaCons "CClGlobal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CClLocal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))

data CTypeSpecifier a #

Constructors

CVoidType a 
CCharType a 
CShortType a 
CIntType a 
CLongType a 
CFloatType a 
CDoubleType a 
CSignedType a 
CUnsigType a 
CBoolType a 
CComplexType a 
CInt128Type a 
CFloatNType Int Bool a

IEC 60227: width (32,64,128), extended flag

CSUType (CStructureUnion a) a

Struct or Union specifier

CEnumType (CEnumeration a) a

Enumeration specifier

CTypeDef Ident a

Typedef name

CTypeOfExpr (CExpression a) a
typeof(expr)
CTypeOfType (CDeclaration a) a
typeof(type)
CAtomicType (CDeclaration a) a
_Atomic(type)

Instances

Instances details
Functor CTypeSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CTypeSpecifier a -> CTypeSpecifier b

(<$) :: a -> CTypeSpecifier b -> CTypeSpecifier a

Annotated CTypeSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CTypeSpecifier a -> a #

amap :: (a -> a) -> CTypeSpecifier a -> CTypeSpecifier a #

Pretty CTypeSpec # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CTypeSpec -> Doc #

prettyPrec :: Int -> CTypeSpec -> Doc #

Data a => Data (CTypeSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CTypeSpecifier a -> c (CTypeSpecifier a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CTypeSpecifier a)

toConstr :: CTypeSpecifier a -> Constr

dataTypeOf :: CTypeSpecifier a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CTypeSpecifier a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CTypeSpecifier a))

gmapT :: (forall b. Data b => b -> b) -> CTypeSpecifier a -> CTypeSpecifier a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CTypeSpecifier a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CTypeSpecifier a -> r

gmapQ :: (forall d. Data d => d -> u) -> CTypeSpecifier a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CTypeSpecifier a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CTypeSpecifier a -> m (CTypeSpecifier a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CTypeSpecifier a -> m (CTypeSpecifier a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CTypeSpecifier a -> m (CTypeSpecifier a)

Show a => Show (CTypeSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CTypeSpecifier a -> ShowS

show :: CTypeSpecifier a -> String

showList :: [CTypeSpecifier a] -> ShowS

Generic (CTypeSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CTypeSpecifier a) :: Type -> Type

Methods

from :: CTypeSpecifier a -> Rep (CTypeSpecifier a) x

to :: Rep (CTypeSpecifier a) x -> CTypeSpecifier a

NFData a => NFData (CTypeSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CTypeSpecifier a -> ()

CNode t1 => Pos (CTypeSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CTypeSpecifier t1 -> Position #

CNode t1 => CNode (CTypeSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CTypeSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CTypeSpecifier :: k -> Type

Methods

from1 :: forall (a :: k). CTypeSpecifier a -> Rep1 CTypeSpecifier a

to1 :: forall (a :: k). Rep1 CTypeSpecifier a -> CTypeSpecifier a

type Rep (CTypeSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CTypeSpecifier a) = D1 ('MetaData "CTypeSpecifier" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) ((((C1 ('MetaCons "CVoidType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CCharType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CShortType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CIntType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))) :+: ((C1 ('MetaCons "CLongType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CFloatType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CDoubleType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons "CSignedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CUnsigType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))) :+: (((C1 ('MetaCons "CBoolType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CComplexType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CInt128Type" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons "CFloatNType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: C1 ('MetaCons "CSUType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStructureUnion a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))) :+: ((C1 ('MetaCons "CEnumType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CEnumeration a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CTypeDef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CTypeOfExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons "CTypeOfType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CAtomicType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))))
type Rep1 CTypeSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CTypeSpecifier = D1 ('MetaData "CTypeSpecifier" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) ((((C1 ('MetaCons "CVoidType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CCharType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) :+: (C1 ('MetaCons "CShortType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CIntType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))) :+: ((C1 ('MetaCons "CLongType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CFloatType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) :+: (C1 ('MetaCons "CDoubleType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: (C1 ('MetaCons "CSignedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CUnsigType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))) :+: (((C1 ('MetaCons "CBoolType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CComplexType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) :+: (C1 ('MetaCons "CInt128Type" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: (C1 ('MetaCons "CFloatNType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) :+: C1 ('MetaCons "CSUType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CStructureUnion) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))) :+: ((C1 ('MetaCons "CEnumType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CEnumeration) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CTypeDef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) :+: (C1 ('MetaCons "CTypeOfExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CExpression) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: (C1 ('MetaCons "CTypeOfType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CDeclaration) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CAtomicType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CDeclaration) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))))

data CAlignmentSpecifier a #

Constructors

CAlignAsType (CDeclaration a) a
_Alignas(type)
CAlignAsExpr (CExpression a) a
_Alignas(expr)

Instances

Instances details
Functor CAlignmentSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CAlignmentSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Pretty CAlignSpec # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CAlignSpec -> Doc #

prettyPrec :: Int -> CAlignSpec -> Doc #

Data a => Data (CAlignmentSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CAlignmentSpecifier a -> c (CAlignmentSpecifier a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CAlignmentSpecifier a)

toConstr :: CAlignmentSpecifier a -> Constr

dataTypeOf :: CAlignmentSpecifier a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CAlignmentSpecifier a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CAlignmentSpecifier a))

gmapT :: (forall b. Data b => b -> b) -> CAlignmentSpecifier a -> CAlignmentSpecifier a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CAlignmentSpecifier a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CAlignmentSpecifier a -> r

gmapQ :: (forall d. Data d => d -> u) -> CAlignmentSpecifier a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CAlignmentSpecifier a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CAlignmentSpecifier a -> m (CAlignmentSpecifier a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CAlignmentSpecifier a -> m (CAlignmentSpecifier a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CAlignmentSpecifier a -> m (CAlignmentSpecifier a)

Show a => Show (CAlignmentSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CAlignmentSpecifier a -> ShowS

show :: CAlignmentSpecifier a -> String

showList :: [CAlignmentSpecifier a] -> ShowS

Generic (CAlignmentSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CAlignmentSpecifier a) :: Type -> Type

NFData a => NFData (CAlignmentSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CAlignmentSpecifier a -> ()

CNode t1 => Pos (CAlignmentSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CAlignmentSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CAlignmentSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CAlignmentSpecifier :: k -> Type

Methods

from1 :: forall (a :: k). CAlignmentSpecifier a -> Rep1 CAlignmentSpecifier a

to1 :: forall (a :: k). Rep1 CAlignmentSpecifier a -> CAlignmentSpecifier a

type Rep (CAlignmentSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CAlignmentSpecifier a) = D1 ('MetaData "CAlignmentSpecifier" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CAlignAsType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CAlignAsExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Rep1 CAlignmentSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CAlignmentSpecifier = D1 ('MetaData "CAlignmentSpecifier" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CAlignAsType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CDeclaration) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CAlignAsExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CExpression) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

data CTypeQualifier a #

Instances

Instances details
Functor CTypeQualifier # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CTypeQualifier a -> CTypeQualifier b

(<$) :: a -> CTypeQualifier b -> CTypeQualifier a

Annotated CTypeQualifier # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CTypeQualifier a -> a #

amap :: (a -> a) -> CTypeQualifier a -> CTypeQualifier a #

Pretty CTypeQual # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CTypeQual -> Doc #

prettyPrec :: Int -> CTypeQual -> Doc #

Data a => Data (CTypeQualifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CTypeQualifier a -> c (CTypeQualifier a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CTypeQualifier a)

toConstr :: CTypeQualifier a -> Constr

dataTypeOf :: CTypeQualifier a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CTypeQualifier a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CTypeQualifier a))

gmapT :: (forall b. Data b => b -> b) -> CTypeQualifier a -> CTypeQualifier a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CTypeQualifier a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CTypeQualifier a -> r

gmapQ :: (forall d. Data d => d -> u) -> CTypeQualifier a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CTypeQualifier a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CTypeQualifier a -> m (CTypeQualifier a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CTypeQualifier a -> m (CTypeQualifier a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CTypeQualifier a -> m (CTypeQualifier a)

Show a => Show (CTypeQualifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CTypeQualifier a -> ShowS

show :: CTypeQualifier a -> String

showList :: [CTypeQualifier a] -> ShowS

Generic (CTypeQualifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CTypeQualifier a) :: Type -> Type

Methods

from :: CTypeQualifier a -> Rep (CTypeQualifier a) x

to :: Rep (CTypeQualifier a) x -> CTypeQualifier a

NFData a => NFData (CTypeQualifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CTypeQualifier a -> ()

CNode t1 => Pos (CTypeQualifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CTypeQualifier t1 -> Position #

CNode t1 => CNode (CTypeQualifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CTypeQualifier # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CTypeQualifier :: k -> Type

Methods

from1 :: forall (a :: k). CTypeQualifier a -> Rep1 CTypeQualifier a

to1 :: forall (a :: k). Rep1 CTypeQualifier a -> CTypeQualifier a

type Rep (CTypeQualifier a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CTypeQualifier a) = D1 ('MetaData "CTypeQualifier" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (((C1 ('MetaCons "CConstQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CVolatQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CRestrQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CAtomicQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))) :+: ((C1 ('MetaCons "CAttrQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CAttribute a))) :+: C1 ('MetaCons "CNullableQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CNonnullQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons "CClRdOnlyQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CClWrOnlyQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))))
type Rep1 CTypeQualifier # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CTypeQualifier = D1 ('MetaData "CTypeQualifier" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (((C1 ('MetaCons "CConstQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CVolatQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) :+: (C1 ('MetaCons "CRestrQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CAtomicQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))) :+: ((C1 ('MetaCons "CAttrQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CAttribute)) :+: C1 ('MetaCons "CNullableQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) :+: (C1 ('MetaCons "CNonnullQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: (C1 ('MetaCons "CClRdOnlyQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CClWrOnlyQual" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))

data CAttribute a #

Constructors

CAttr Ident [CExpression a] a 

Instances

Instances details
Functor CAttribute # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CAttribute a -> CAttribute b

(<$) :: a -> CAttribute b -> CAttribute a

Annotated CAttribute # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CAttribute a -> a #

amap :: (a -> a) -> CAttribute a -> CAttribute a #

Pretty CAttr # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CAttr -> Doc #

prettyPrec :: Int -> CAttr -> Doc #

Data a => Data (CAttribute a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CAttribute a -> c (CAttribute a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CAttribute a)

toConstr :: CAttribute a -> Constr

dataTypeOf :: CAttribute a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CAttribute a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CAttribute a))

gmapT :: (forall b. Data b => b -> b) -> CAttribute a -> CAttribute a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CAttribute a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CAttribute a -> r

gmapQ :: (forall d. Data d => d -> u) -> CAttribute a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CAttribute a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CAttribute a -> m (CAttribute a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CAttribute a -> m (CAttribute a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CAttribute a -> m (CAttribute a)

Show a => Show (CAttribute a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CAttribute a -> ShowS

show :: CAttribute a -> String

showList :: [CAttribute a] -> ShowS

Generic (CAttribute a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CAttribute a) :: Type -> Type

Methods

from :: CAttribute a -> Rep (CAttribute a) x

to :: Rep (CAttribute a) x -> CAttribute a

NFData a => NFData (CAttribute a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CAttribute a -> ()

CNode t1 => Pos (CAttribute t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CAttribute t1 -> Position #

CNode t1 => CNode (CAttribute t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

nodeInfo :: CAttribute t1 -> NodeInfo #

Generic1 CAttribute # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CAttribute :: k -> Type

Methods

from1 :: forall (a :: k). CAttribute a -> Rep1 CAttribute a

to1 :: forall (a :: k). Rep1 CAttribute a -> CAttribute a

type Rep (CAttribute a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CAttribute a) = D1 ('MetaData "CAttribute" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CAttr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CExpression a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))
type Rep1 CAttribute # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CAttribute = D1 ('MetaData "CAttribute" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CAttr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 CExpression) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))

Declarators

type CDeclr = CDeclarator NodeInfo #

C declarator (K&R A8.5, C99 6.7.5) and abstract declarator (K&R A8.8, C99 6.7.6)

A declarator declares a single object, function, or type. It is always associated with a declaration (CDecl), which specifies the declaration's type and the additional storage qualifiers and attributes, which apply to the declared object.

A declarator is of the form CDeclr name? indirections asm-name? attrs _, where name is the name of the declared object (missing for abstract declarators), declquals is a set of additional declaration specifiers, asm-name is the optional assembler name and attributes is a set of attrs is a set of attribute annotations for the declared object.

indirections is a set of pointer, array and function declarators, which modify the type of the declared object as described below. If the declaration specifies the non-derived type T, and we have indirections = [D1, D2, ..., Dn] than the declared object has type (D1 indirect (D2 indirect ... (Dn indirect T))), where

  • (CPtrDeclr attrs) indirect T is attributed pointer to T
  • (CFunDeclr attrs) indirect T is attributed function returning T
  • (CArrayDeclr attrs) indirect T is attributed array of elemements of type T

Examples (simplified attributes):

  • x is an int
int x;
CDeclr "x" []
  • x is a restrict pointer to a const pointer to int
const int * const * restrict x;
CDeclr "x" [CPtrDeclr [restrict], CPtrDeclr [const]]
  • f is an function return a constant pointer to int
int* const f();
CDeclr "f" [CFunDeclr [],CPtrDeclr [const]]
  • f is a constant pointer to a function returning int
int (* const f)(); ==>
CDeclr "f" [CPtrDeclr [const], CFunDeclr []]

type CDerivedDeclr = CDerivedDeclarator NodeInfo #

Derived declarators, see CDeclr

Indirections are qualified using type-qualifiers and generic attributes, and additionally

  • The size of an array is either a constant expression, variable length (*) or missing; in the last case, the type of the array is incomplete. The qualifier static is allowed for function arguments only, indicating that the supplied argument is an array of at least the given size.
  • New style parameter lists have the form Right (declarations, isVariadic), old style parameter lists have the form Left (parameter-names)

type CArrSize = CArraySize NodeInfo #

Size of an array

data CDeclarator a #

Constructors

CDeclr (Maybe Ident) [CDerivedDeclarator a] (Maybe (CStringLiteral a)) [CAttribute a] a 

Instances

Instances details
Functor CDeclarator # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CDeclarator a -> CDeclarator b

(<$) :: a -> CDeclarator b -> CDeclarator a

Annotated CDeclarator # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CDeclarator a -> a #

amap :: (a -> a) -> CDeclarator a -> CDeclarator a #

Pretty CDeclr # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CDeclr -> Doc #

prettyPrec :: Int -> CDeclr -> Doc #

Data a => Data (CDeclarator a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CDeclarator a -> c (CDeclarator a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CDeclarator a)

toConstr :: CDeclarator a -> Constr

dataTypeOf :: CDeclarator a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CDeclarator a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CDeclarator a))

gmapT :: (forall b. Data b => b -> b) -> CDeclarator a -> CDeclarator a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CDeclarator a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CDeclarator a -> r

gmapQ :: (forall d. Data d => d -> u) -> CDeclarator a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CDeclarator a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CDeclarator a -> m (CDeclarator a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CDeclarator a -> m (CDeclarator a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CDeclarator a -> m (CDeclarator a)

Show a => Show (CDeclarator a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CDeclarator a -> ShowS

show :: CDeclarator a -> String

showList :: [CDeclarator a] -> ShowS

Generic (CDeclarator a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CDeclarator a) :: Type -> Type

Methods

from :: CDeclarator a -> Rep (CDeclarator a) x

to :: Rep (CDeclarator a) x -> CDeclarator a

NFData a => NFData (CDeclarator a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CDeclarator a -> ()

CNode t1 => Pos (CDeclarator t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CDeclarator t1 -> Position #

CNode t1 => CNode (CDeclarator t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

nodeInfo :: CDeclarator t1 -> NodeInfo #

Generic1 CDeclarator # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CDeclarator :: k -> Type

Methods

from1 :: forall (a :: k). CDeclarator a -> Rep1 CDeclarator a

to1 :: forall (a :: k). Rep1 CDeclarator a -> CDeclarator a

type Rep (CDeclarator a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CDeclarator a) = D1 ('MetaData "CDeclarator" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CDeclr" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Ident)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CDerivedDeclarator a])) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (CStringLiteral a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CAttribute a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))
type Rep1 CDeclarator # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CDeclarator = D1 ('MetaData "CDeclarator" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CDeclr" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Ident)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 CDerivedDeclarator)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Maybe :.: Rec1 CStringLiteral) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 CAttribute) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))

data CDerivedDeclarator a #

Constructors

CPtrDeclr [CTypeQualifier a] a

Pointer declarator CPtrDeclr tyquals declr

CArrDeclr [CTypeQualifier a] (CArraySize a) a

Array declarator CArrDeclr declr tyquals size-expr?

CFunDeclr (Either [Ident] ([CDeclaration a], Bool)) [CAttribute a] a

Function declarator CFunDeclr declr (old-style-params | new-style-params) c-attrs

Instances

Instances details
Functor CDerivedDeclarator # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CDerivedDeclarator # 
Instance details

Defined in Language.C.Syntax.AST

Data a => Data (CDerivedDeclarator a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CDerivedDeclarator a -> c (CDerivedDeclarator a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CDerivedDeclarator a)

toConstr :: CDerivedDeclarator a -> Constr

dataTypeOf :: CDerivedDeclarator a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CDerivedDeclarator a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CDerivedDeclarator a))

gmapT :: (forall b. Data b => b -> b) -> CDerivedDeclarator a -> CDerivedDeclarator a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CDerivedDeclarator a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CDerivedDeclarator a -> r

gmapQ :: (forall d. Data d => d -> u) -> CDerivedDeclarator a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CDerivedDeclarator a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CDerivedDeclarator a -> m (CDerivedDeclarator a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CDerivedDeclarator a -> m (CDerivedDeclarator a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CDerivedDeclarator a -> m (CDerivedDeclarator a)

Show a => Show (CDerivedDeclarator a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CDerivedDeclarator a -> ShowS

show :: CDerivedDeclarator a -> String

showList :: [CDerivedDeclarator a] -> ShowS

Generic (CDerivedDeclarator a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CDerivedDeclarator a) :: Type -> Type

NFData a => NFData (CDerivedDeclarator a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CDerivedDeclarator a -> ()

CNode t1 => Pos (CDerivedDeclarator t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CDerivedDeclarator t1) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CDerivedDeclarator a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CDerivedDeclarator a) = D1 ('MetaData "CDerivedDeclarator" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CPtrDeclr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CTypeQualifier a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons "CArrDeclr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CTypeQualifier a]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CArraySize a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: C1 ('MetaCons "CFunDeclr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either [Ident] ([CDeclaration a], Bool))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CAttribute a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))

data CArraySize a #

Constructors

CNoArrSize Bool
CUnknownSize isCompleteType
CArrSize Bool (CExpression a)
CArrSize isStatic expr

Instances

Instances details
Functor CArraySize # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CArraySize a -> CArraySize b

(<$) :: a -> CArraySize b -> CArraySize a

Pretty CArrSize # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CArrSize -> Doc #

prettyPrec :: Int -> CArrSize -> Doc #

Data a => Data (CArraySize a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CArraySize a -> c (CArraySize a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CArraySize a)

toConstr :: CArraySize a -> Constr

dataTypeOf :: CArraySize a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CArraySize a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CArraySize a))

gmapT :: (forall b. Data b => b -> b) -> CArraySize a -> CArraySize a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CArraySize a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CArraySize a -> r

gmapQ :: (forall d. Data d => d -> u) -> CArraySize a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CArraySize a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CArraySize a -> m (CArraySize a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CArraySize a -> m (CArraySize a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CArraySize a -> m (CArraySize a)

Show a => Show (CArraySize a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CArraySize a -> ShowS

show :: CArraySize a -> String

showList :: [CArraySize a] -> ShowS

Generic (CArraySize a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CArraySize a) :: Type -> Type

Methods

from :: CArraySize a -> Rep (CArraySize a) x

to :: Rep (CArraySize a) x -> CArraySize a

NFData a => NFData (CArraySize a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CArraySize a -> ()

Generic1 CArraySize # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CArraySize :: k -> Type

Methods

from1 :: forall (a :: k). CArraySize a -> Rep1 CArraySize a

to1 :: forall (a :: k). Rep1 CArraySize a -> CArraySize a

type Rep (CArraySize a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CArraySize a) = D1 ('MetaData "CArraySize" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CNoArrSize" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :+: C1 ('MetaCons "CArrSize" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a))))
type Rep1 CArraySize # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CArraySize = D1 ('MetaData "CArraySize" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CNoArrSize" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :+: C1 ('MetaCons "CArrSize" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CExpression)))

Initialization

type CInit = CInitializer NodeInfo #

C initialization (K&R A8.7, C99 6.7.8)

Initializers are either assignment expressions or initializer lists (surrounded in curly braces), whose elements are themselves initializers, paired with an optional list of designators.

type CInitList = CInitializerList NodeInfo #

Initializer List

The members of an initializer list are of the form (designator-list,initializer). The designator-list specifies one member of the compound type which is initialized. It is allowed to be empty - in this case the initializer refers to the 'next' member of the compound type (see C99 6.7.8).

Examples (simplified expressions and identifiers):

-- int x[3][4] = { [0][3] = 4, [2] = 5, 8 };
--   corresponds to the assignments
-- x[0][3] = 4; x[2][0] = 5; x[2][1] = 8;
let init1 = ([CArrDesig 0, CArrDesig 3], CInitExpr 4)
    init2 = ([CArrDesig 2]             , CInitExpr 5)
    init3 = ([]                        , CInitExpr 8)
in  CInitList [init1, init2, init3]
-- struct { struct { int a[2]; int b[2]; int c[2]; } s; } x = { .s = { {2,3} , .c[0] = 1 } };
--   corresponds to the assignments
-- x.s.a[0] = 2; x.s.a[1] = 3; x.s.c[0] = 1;
let init_s_0 = CInitList [ ([], CInitExpr 2), ([], CInitExpr 3)]
    init_s   = CInitList [
                           ([], init_s_0),
                           ([CMemberDesig "c", CArrDesig 0], CInitExpr 1)
                         ]
in  CInitList [(CMemberDesig "s", init_s)]

type CDesignator = CPartDesignator NodeInfo #

Designators

A designator specifies a member of an object, either an element or range of an array, or the named member of a struct / union.

data CInitializer a #

Constructors

CInitExpr (CExpression a) a

assignment expression

CInitList (CInitializerList a) a

initialization list (see CInitList)

Instances

Instances details
Functor CInitializer # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CInitializer a -> CInitializer b

(<$) :: a -> CInitializer b -> CInitializer a

Annotated CInitializer # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CInitializer a -> a #

amap :: (a -> a) -> CInitializer a -> CInitializer a #

Pretty CInit # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CInit -> Doc #

prettyPrec :: Int -> CInit -> Doc #

Data a => Data (CInitializer a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CInitializer a -> c (CInitializer a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CInitializer a)

toConstr :: CInitializer a -> Constr

dataTypeOf :: CInitializer a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CInitializer a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CInitializer a))

gmapT :: (forall b. Data b => b -> b) -> CInitializer a -> CInitializer a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CInitializer a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CInitializer a -> r

gmapQ :: (forall d. Data d => d -> u) -> CInitializer a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CInitializer a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CInitializer a -> m (CInitializer a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CInitializer a -> m (CInitializer a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CInitializer a -> m (CInitializer a)

Show a => Show (CInitializer a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CInitializer a -> ShowS

show :: CInitializer a -> String

showList :: [CInitializer a] -> ShowS

Generic (CInitializer a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CInitializer a) :: Type -> Type

Methods

from :: CInitializer a -> Rep (CInitializer a) x

to :: Rep (CInitializer a) x -> CInitializer a

NFData a => NFData (CInitializer a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CInitializer a -> ()

CNode t1 => Pos (CInitializer t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CInitializer t1 -> Position #

CNode t1 => CNode (CInitializer t1) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CInitializer a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CInitializer a) = D1 ('MetaData "CInitializer" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CInitExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CInitList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CInitializerList a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

data CPartDesignator a #

Constructors

CArrDesig (CExpression a) a

array position designator

CMemberDesig Ident a

member designator

CRangeDesig (CExpression a) (CExpression a) a

array range designator CRangeDesig from to _ (GNU C)

Instances

Instances details
Functor CPartDesignator # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CPartDesignator a -> CPartDesignator b

(<$) :: a -> CPartDesignator b -> CPartDesignator a

Annotated CPartDesignator # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CPartDesignator a -> a #

amap :: (a -> a) -> CPartDesignator a -> CPartDesignator a #

Pretty CDesignator # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CDesignator -> Doc #

prettyPrec :: Int -> CDesignator -> Doc #

Data a => Data (CPartDesignator a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CPartDesignator a -> c (CPartDesignator a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CPartDesignator a)

toConstr :: CPartDesignator a -> Constr

dataTypeOf :: CPartDesignator a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CPartDesignator a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CPartDesignator a))

gmapT :: (forall b. Data b => b -> b) -> CPartDesignator a -> CPartDesignator a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CPartDesignator a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CPartDesignator a -> r

gmapQ :: (forall d. Data d => d -> u) -> CPartDesignator a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CPartDesignator a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CPartDesignator a -> m (CPartDesignator a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CPartDesignator a -> m (CPartDesignator a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CPartDesignator a -> m (CPartDesignator a)

Show a => Show (CPartDesignator a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CPartDesignator a -> ShowS

show :: CPartDesignator a -> String

showList :: [CPartDesignator a] -> ShowS

Generic (CPartDesignator a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CPartDesignator a) :: Type -> Type

Methods

from :: CPartDesignator a -> Rep (CPartDesignator a) x

to :: Rep (CPartDesignator a) x -> CPartDesignator a

NFData a => NFData (CPartDesignator a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CPartDesignator a -> ()

CNode t1 => Pos (CPartDesignator t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CPartDesignator t1) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CPartDesignator a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CPartDesignator a) = D1 ('MetaData "CPartDesignator" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CArrDesig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons "CMemberDesig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CRangeDesig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))

Statements

type CStat = CStatement NodeInfo #

C statement (K&R A9, C99 6.8)

type CBlockItem = CCompoundBlockItem NodeInfo #

C99 Block items

Things that may appear in compound statements: either statements, declarations or nested function definitions.

type CAsmStmt = CAssemblyStatement NodeInfo #

GNU Assembler statement

CAssemblyStatement type-qual? asm-expr out-ops in-ops clobbers _

is an inline assembler statement. The only type-qualifier (if any) allowed is volatile. asm-expr is the actual assembler epxression (a string), out-ops and in-ops are the input and output operands of the statement. clobbers is a list of registers which are clobbered when executing the assembler statement

type CAsmOperand = CAssemblyOperand NodeInfo #

Assembler operand

CAsmOperand argName? constraintExpr arg specifies an operand for an assembler statement.

data CStatement a #

Constructors

CLabel Ident (CStatement a) [CAttribute a] a

An (attributed) label followed by a statement

CCase (CExpression a) (CStatement a) a

A statement of the form case expr : stmt

CCases (CExpression a) (CExpression a) (CStatement a) a

A case range of the form case lower ... upper : stmt

CDefault (CStatement a) a

The default case default : stmt

CExpr (Maybe (CExpression a)) a

A simple statement, that is in C: evaluating an expression with side-effects and discarding the result.

CCompound [Ident] [CCompoundBlockItem a] a

compound statement CCompound localLabels blockItems at

CIf (CExpression a) (CStatement a) (Maybe (CStatement a)) a

conditional statement CIf ifExpr thenStmt maybeElseStmt at

CSwitch (CExpression a) (CStatement a) a

switch statement CSwitch selectorExpr switchStmt, where switchStmt usually includes case, break and default statements

CWhile (CExpression a) (CStatement a) Bool a

while or do-while statement CWhile guard stmt isDoWhile at

CFor (Either (Maybe (CExpression a)) (CDeclaration a)) (Maybe (CExpression a)) (Maybe (CExpression a)) (CStatement a) a

for statement CFor init expr-2 expr-3 stmt, where init is either a declaration or initializing expression

CGoto Ident a

goto statement CGoto label

CGotoPtr (CExpression a) a

computed goto CGotoPtr labelExpr

CCont a

continue statement

CBreak a

break statement

CReturn (Maybe (CExpression a)) a

return statement CReturn returnExpr

CAsm (CAssemblyStatement a) a

assembly statement

Instances

Instances details
Functor CStatement # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CStatement a -> CStatement b

(<$) :: a -> CStatement b -> CStatement a

Annotated CStatement # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CStatement a -> a #

amap :: (a -> a) -> CStatement a -> CStatement a #

Pretty CStat # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CStat -> Doc #

prettyPrec :: Int -> CStat -> Doc #

Data a => Data (CStatement a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CStatement a -> c (CStatement a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CStatement a)

toConstr :: CStatement a -> Constr

dataTypeOf :: CStatement a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CStatement a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CStatement a))

gmapT :: (forall b. Data b => b -> b) -> CStatement a -> CStatement a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CStatement a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CStatement a -> r

gmapQ :: (forall d. Data d => d -> u) -> CStatement a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CStatement a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CStatement a -> m (CStatement a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CStatement a -> m (CStatement a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CStatement a -> m (CStatement a)

Show a => Show (CStatement a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CStatement a -> ShowS

show :: CStatement a -> String

showList :: [CStatement a] -> ShowS

Generic (CStatement a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CStatement a) :: Type -> Type

Methods

from :: CStatement a -> Rep (CStatement a) x

to :: Rep (CStatement a) x -> CStatement a

NFData a => NFData (CStatement a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CStatement a -> ()

CNode t1 => Pos (CStatement t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CStatement t1 -> Position #

CNode t1 => CNode (CStatement t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

nodeInfo :: CStatement t1 -> NodeInfo #

type Rep (CStatement a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CStatement a) = D1 ('MetaData "CStatement" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) ((((C1 ('MetaCons "CLabel" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStatement a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CAttribute a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: C1 ('MetaCons "CCase" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStatement a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))) :+: (C1 ('MetaCons "CCases" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStatement a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: C1 ('MetaCons "CDefault" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStatement a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))) :+: ((C1 ('MetaCons "CExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (CExpression a))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CCompound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Ident]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CCompoundBlockItem a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))) :+: (C1 ('MetaCons "CIf" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStatement a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (CStatement a))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: C1 ('MetaCons "CSwitch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStatement a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))) :+: (((C1 ('MetaCons "CWhile" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStatement a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: C1 ('MetaCons "CFor" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either (Maybe (CExpression a)) (CDeclaration a))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (CExpression a)))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (CExpression a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStatement a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))) :+: (C1 ('MetaCons "CGoto" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CGotoPtr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))) :+: ((C1 ('MetaCons "CCont" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CBreak" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CReturn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (CExpression a))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CAsm" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CAssemblyStatement a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))))

data CCompoundBlockItem a #

Constructors

CBlockStmt (CStatement a)

A statement

CBlockDecl (CDeclaration a)

A local declaration

CNestedFunDef (CFunctionDef a)

A nested function (GNU C)

Instances

Instances details
Functor CCompoundBlockItem # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CCompoundBlockItem # 
Instance details

Defined in Language.C.Syntax.AST

Pretty CBlockItem # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CBlockItem -> Doc #

prettyPrec :: Int -> CBlockItem -> Doc #

Data a => Data (CCompoundBlockItem a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CCompoundBlockItem a -> c (CCompoundBlockItem a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CCompoundBlockItem a)

toConstr :: CCompoundBlockItem a -> Constr

dataTypeOf :: CCompoundBlockItem a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CCompoundBlockItem a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CCompoundBlockItem a))

gmapT :: (forall b. Data b => b -> b) -> CCompoundBlockItem a -> CCompoundBlockItem a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CCompoundBlockItem a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CCompoundBlockItem a -> r

gmapQ :: (forall d. Data d => d -> u) -> CCompoundBlockItem a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CCompoundBlockItem a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CCompoundBlockItem a -> m (CCompoundBlockItem a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CCompoundBlockItem a -> m (CCompoundBlockItem a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CCompoundBlockItem a -> m (CCompoundBlockItem a)

Show a => Show (CCompoundBlockItem a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CCompoundBlockItem a -> ShowS

show :: CCompoundBlockItem a -> String

showList :: [CCompoundBlockItem a] -> ShowS

Generic (CCompoundBlockItem a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CCompoundBlockItem a) :: Type -> Type

NFData a => NFData (CCompoundBlockItem a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CCompoundBlockItem a -> ()

CNode t1 => Pos (CCompoundBlockItem t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CCompoundBlockItem t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CCompoundBlockItem # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CCompoundBlockItem :: k -> Type

Methods

from1 :: forall (a :: k). CCompoundBlockItem a -> Rep1 CCompoundBlockItem a

to1 :: forall (a :: k). Rep1 CCompoundBlockItem a -> CCompoundBlockItem a

type Rep (CCompoundBlockItem a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CCompoundBlockItem a) = D1 ('MetaData "CCompoundBlockItem" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CBlockStmt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStatement a))) :+: (C1 ('MetaCons "CBlockDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a))) :+: C1 ('MetaCons "CNestedFunDef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CFunctionDef a)))))
type Rep1 CCompoundBlockItem # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CCompoundBlockItem = D1 ('MetaData "CCompoundBlockItem" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CBlockStmt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CStatement)) :+: (C1 ('MetaCons "CBlockDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CDeclaration)) :+: C1 ('MetaCons "CNestedFunDef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CFunctionDef))))

data CAssemblyStatement a #

Instances

Instances details
Functor CAssemblyStatement # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CAssemblyStatement # 
Instance details

Defined in Language.C.Syntax.AST

Pretty CAsmStmt # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CAsmStmt -> Doc #

prettyPrec :: Int -> CAsmStmt -> Doc #

Data a => Data (CAssemblyStatement a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CAssemblyStatement a -> c (CAssemblyStatement a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CAssemblyStatement a)

toConstr :: CAssemblyStatement a -> Constr

dataTypeOf :: CAssemblyStatement a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CAssemblyStatement a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CAssemblyStatement a))

gmapT :: (forall b. Data b => b -> b) -> CAssemblyStatement a -> CAssemblyStatement a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CAssemblyStatement a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CAssemblyStatement a -> r

gmapQ :: (forall d. Data d => d -> u) -> CAssemblyStatement a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CAssemblyStatement a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CAssemblyStatement a -> m (CAssemblyStatement a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CAssemblyStatement a -> m (CAssemblyStatement a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CAssemblyStatement a -> m (CAssemblyStatement a)

Show a => Show (CAssemblyStatement a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CAssemblyStatement a -> ShowS

show :: CAssemblyStatement a -> String

showList :: [CAssemblyStatement a] -> ShowS

Generic (CAssemblyStatement a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CAssemblyStatement a) :: Type -> Type

NFData a => NFData (CAssemblyStatement a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CAssemblyStatement a -> ()

CNode t1 => Pos (CAssemblyStatement t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CAssemblyStatement t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CAssemblyStatement # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CAssemblyStatement :: k -> Type

Methods

from1 :: forall (a :: k). CAssemblyStatement a -> Rep1 CAssemblyStatement a

to1 :: forall (a :: k). Rep1 CAssemblyStatement a -> CAssemblyStatement a

type Rep (CAssemblyStatement a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CAssemblyStatement a) = D1 ('MetaData "CAssemblyStatement" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CAsmStmt" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (CTypeQualifier a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStringLiteral a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CAssemblyOperand a]))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CAssemblyOperand a]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CStringLiteral a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))
type Rep1 CAssemblyStatement # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CAssemblyStatement = D1 ('MetaData "CAssemblyStatement" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CAsmStmt" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Maybe :.: Rec1 CTypeQualifier) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CStringLiteral) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 CAssemblyOperand))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 CAssemblyOperand) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 CStringLiteral) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))

data CAssemblyOperand a #

Constructors

CAsmOperand (Maybe Ident) (CStringLiteral a) (CExpression a) a 

Instances

Instances details
Functor CAssemblyOperand # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CAssemblyOperand a -> CAssemblyOperand b

(<$) :: a -> CAssemblyOperand b -> CAssemblyOperand a

Annotated CAssemblyOperand # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CAssemblyOperand a -> a #

amap :: (a -> a) -> CAssemblyOperand a -> CAssemblyOperand a #

Pretty CAsmOperand # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CAsmOperand -> Doc #

prettyPrec :: Int -> CAsmOperand -> Doc #

Data a => Data (CAssemblyOperand a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CAssemblyOperand a -> c (CAssemblyOperand a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CAssemblyOperand a)

toConstr :: CAssemblyOperand a -> Constr

dataTypeOf :: CAssemblyOperand a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CAssemblyOperand a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CAssemblyOperand a))

gmapT :: (forall b. Data b => b -> b) -> CAssemblyOperand a -> CAssemblyOperand a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CAssemblyOperand a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CAssemblyOperand a -> r

gmapQ :: (forall d. Data d => d -> u) -> CAssemblyOperand a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CAssemblyOperand a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CAssemblyOperand a -> m (CAssemblyOperand a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CAssemblyOperand a -> m (CAssemblyOperand a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CAssemblyOperand a -> m (CAssemblyOperand a)

Show a => Show (CAssemblyOperand a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CAssemblyOperand a -> ShowS

show :: CAssemblyOperand a -> String

showList :: [CAssemblyOperand a] -> ShowS

Generic (CAssemblyOperand a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CAssemblyOperand a) :: Type -> Type

Methods

from :: CAssemblyOperand a -> Rep (CAssemblyOperand a) x

to :: Rep (CAssemblyOperand a) x -> CAssemblyOperand a

NFData a => NFData (CAssemblyOperand a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CAssemblyOperand a -> ()

CNode t1 => Pos (CAssemblyOperand t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => CNode (CAssemblyOperand t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CAssemblyOperand # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CAssemblyOperand :: k -> Type

Methods

from1 :: forall (a :: k). CAssemblyOperand a -> Rep1 CAssemblyOperand a

to1 :: forall (a :: k). Rep1 CAssemblyOperand a -> CAssemblyOperand a

type Rep (CAssemblyOperand a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CAssemblyOperand a) = D1 ('MetaData "CAssemblyOperand" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CAsmOperand" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Ident)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStringLiteral a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))
type Rep1 CAssemblyOperand # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CAssemblyOperand = D1 ('MetaData "CAssemblyOperand" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CAsmOperand" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Ident)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CStringLiteral)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 CExpression) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))

Expressions

type CExpr = CExpression NodeInfo #

C expression (K&R A7)

  • these can be arbitrary expression, as the argument of sizeof can be arbitrary, even if appearing in a constant expression
  • GNU C extensions: alignof, __real, __imag, ({ stmt-expr }), && label and built-ins

data CExpression a #

Constructors

CComma [CExpression a] a 
CAssign CAssignOp (CExpression a) (CExpression a) a 
CCond (CExpression a) (Maybe (CExpression a)) (CExpression a) a 
CBinary CBinaryOp (CExpression a) (CExpression a) a 
CCast (CDeclaration a) (CExpression a) a 
CUnary CUnaryOp (CExpression a) a 
CSizeofExpr (CExpression a) a 
CSizeofType (CDeclaration a) a 
CAlignofExpr (CExpression a) a 
CAlignofType (CDeclaration a) a 
CComplexReal (CExpression a) a 
CComplexImag (CExpression a) a 
CIndex (CExpression a) (CExpression a) a 
CCall (CExpression a) [CExpression a] a 
CMember (CExpression a) Ident Bool a 
CVar Ident a 
CConst (CConstant a)

integer, character, floating point and string constants

CCompoundLit (CDeclaration a) (CInitializerList a) a

C99 compound literal

CGenericSelection (CExpression a) [(Maybe (CDeclaration a), CExpression a)] a

C11 generic selection

CStatExpr (CStatement a) a

GNU C compound statement as expr

CLabAddrExpr Ident a

GNU C address of label

CBuiltinExpr (CBuiltinThing a)

builtin expressions, see CBuiltin

Instances

Instances details
Functor CExpression # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CExpression a -> CExpression b

(<$) :: a -> CExpression b -> CExpression a

Annotated CExpression # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CExpression a -> a #

amap :: (a -> a) -> CExpression a -> CExpression a #

Pretty CExpr # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CExpr -> Doc #

prettyPrec :: Int -> CExpr -> Doc #

Data a => Data (CExpression a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CExpression a -> c (CExpression a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CExpression a)

toConstr :: CExpression a -> Constr

dataTypeOf :: CExpression a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CExpression a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CExpression a))

gmapT :: (forall b. Data b => b -> b) -> CExpression a -> CExpression a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CExpression a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CExpression a -> r

gmapQ :: (forall d. Data d => d -> u) -> CExpression a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CExpression a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CExpression a -> m (CExpression a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CExpression a -> m (CExpression a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CExpression a -> m (CExpression a)

Show a => Show (CExpression a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CExpression a -> ShowS

show :: CExpression a -> String

showList :: [CExpression a] -> ShowS

Generic (CExpression a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CExpression a) :: Type -> Type

Methods

from :: CExpression a -> Rep (CExpression a) x

to :: Rep (CExpression a) x -> CExpression a

NFData a => NFData (CExpression a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CExpression a -> ()

CNode t1 => Pos (CExpression t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CExpression t1 -> Position #

CNode t1 => CNode (CExpression t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

nodeInfo :: CExpression t1 -> NodeInfo #

type Rep (CExpression a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CExpression a) = D1 ('MetaData "CExpression" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) ((((C1 ('MetaCons "CComma" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CExpression a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CAssign" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CAssignOp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))) :+: (C1 ('MetaCons "CCond" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (CExpression a)))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CBinary" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CBinaryOp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: C1 ('MetaCons "CCast" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))) :+: ((C1 ('MetaCons "CUnary" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUnaryOp) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CSizeofExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CSizeofType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))) :+: (C1 ('MetaCons "CAlignofExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons "CAlignofType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CComplexReal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))) :+: (((C1 ('MetaCons "CComplexImag" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CIndex" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))) :+: (C1 ('MetaCons "CCall" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CExpression a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CMember" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: C1 ('MetaCons "CVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))) :+: ((C1 ('MetaCons "CConst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CConstant a))) :+: (C1 ('MetaCons "CCompoundLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CInitializerList a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: C1 ('MetaCons "CGenericSelection" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Maybe (CDeclaration a), CExpression a)]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))) :+: (C1 ('MetaCons "CStatExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CStatement a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: (C1 ('MetaCons "CLabAddrExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CBuiltinExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CBuiltinThing a))))))))

data CAssignOp #

C assignment operators (K&R A7.17)

Instances

Instances details
Eq CAssignOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

(==) :: CAssignOp -> CAssignOp -> Bool

(/=) :: CAssignOp -> CAssignOp -> Bool

Data CAssignOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CAssignOp -> c CAssignOp

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CAssignOp

toConstr :: CAssignOp -> Constr

dataTypeOf :: CAssignOp -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CAssignOp)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CAssignOp)

gmapT :: (forall b. Data b => b -> b) -> CAssignOp -> CAssignOp

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CAssignOp -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CAssignOp -> r

gmapQ :: (forall d. Data d => d -> u) -> CAssignOp -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CAssignOp -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CAssignOp -> m CAssignOp

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CAssignOp -> m CAssignOp

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CAssignOp -> m CAssignOp

Ord CAssignOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

compare :: CAssignOp -> CAssignOp -> Ordering

(<) :: CAssignOp -> CAssignOp -> Bool

(<=) :: CAssignOp -> CAssignOp -> Bool

(>) :: CAssignOp -> CAssignOp -> Bool

(>=) :: CAssignOp -> CAssignOp -> Bool

max :: CAssignOp -> CAssignOp -> CAssignOp

min :: CAssignOp -> CAssignOp -> CAssignOp

Show CAssignOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

showsPrec :: Int -> CAssignOp -> ShowS

show :: CAssignOp -> String

showList :: [CAssignOp] -> ShowS

Generic CAssignOp # 
Instance details

Defined in Language.C.Syntax.Ops

Associated Types

type Rep CAssignOp :: Type -> Type

Methods

from :: CAssignOp -> Rep CAssignOp x

to :: Rep CAssignOp x -> CAssignOp

NFData CAssignOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

rnf :: CAssignOp -> ()

Pretty CAssignOp # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CAssignOp -> Doc #

prettyPrec :: Int -> CAssignOp -> Doc #

type Rep CAssignOp # 
Instance details

Defined in Language.C.Syntax.Ops

type Rep CAssignOp = D1 ('MetaData "CAssignOp" "Language.C.Syntax.Ops" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (((C1 ('MetaCons "CAssignOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CMulAssOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CDivAssOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CRmdAssOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CAddAssOp" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "CSubAssOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CShlAssOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CShrAssOp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "CAndAssOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CXorAssOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "COrAssOp" 'PrefixI 'False) (U1 :: Type -> Type)))))

data CBinaryOp #

C binary operators (K&R A7.6-15)

Constructors

CMulOp 
CDivOp 
CRmdOp

remainder of division

CAddOp 
CSubOp 
CShlOp

shift left

CShrOp

shift right

CLeOp

less

CGrOp

greater

CLeqOp

less or equal

CGeqOp

greater or equal

CEqOp

equal

CNeqOp

not equal

CAndOp

bitwise and

CXorOp

exclusive bitwise or

COrOp

inclusive bitwise or

CLndOp

logical and

CLorOp

logical or

Instances

Instances details
Eq CBinaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

(==) :: CBinaryOp -> CBinaryOp -> Bool

(/=) :: CBinaryOp -> CBinaryOp -> Bool

Data CBinaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CBinaryOp -> c CBinaryOp

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CBinaryOp

toConstr :: CBinaryOp -> Constr

dataTypeOf :: CBinaryOp -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CBinaryOp)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CBinaryOp)

gmapT :: (forall b. Data b => b -> b) -> CBinaryOp -> CBinaryOp

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CBinaryOp -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CBinaryOp -> r

gmapQ :: (forall d. Data d => d -> u) -> CBinaryOp -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CBinaryOp -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CBinaryOp -> m CBinaryOp

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CBinaryOp -> m CBinaryOp

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CBinaryOp -> m CBinaryOp

Ord CBinaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

compare :: CBinaryOp -> CBinaryOp -> Ordering

(<) :: CBinaryOp -> CBinaryOp -> Bool

(<=) :: CBinaryOp -> CBinaryOp -> Bool

(>) :: CBinaryOp -> CBinaryOp -> Bool

(>=) :: CBinaryOp -> CBinaryOp -> Bool

max :: CBinaryOp -> CBinaryOp -> CBinaryOp

min :: CBinaryOp -> CBinaryOp -> CBinaryOp

Show CBinaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

showsPrec :: Int -> CBinaryOp -> ShowS

show :: CBinaryOp -> String

showList :: [CBinaryOp] -> ShowS

Generic CBinaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

Associated Types

type Rep CBinaryOp :: Type -> Type

Methods

from :: CBinaryOp -> Rep CBinaryOp x

to :: Rep CBinaryOp x -> CBinaryOp

NFData CBinaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

rnf :: CBinaryOp -> ()

Pretty CBinaryOp # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CBinaryOp -> Doc #

prettyPrec :: Int -> CBinaryOp -> Doc #

type Rep CBinaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

type Rep CBinaryOp = D1 ('MetaData "CBinaryOp" "Language.C.Syntax.Ops" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) ((((C1 ('MetaCons "CMulOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CDivOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CRmdOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CAddOp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "CSubOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CShlOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CShrOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CLeOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CGrOp" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "CLeqOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CGeqOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CEqOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CNeqOp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "CAndOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CXorOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "COrOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CLndOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CLorOp" 'PrefixI 'False) (U1 :: Type -> Type))))))

data CUnaryOp #

C unary operator (K&R A7.3-4)

Constructors

CPreIncOp

prefix increment operator

CPreDecOp

prefix decrement operator

CPostIncOp

postfix increment operator

CPostDecOp

postfix decrement operator

CAdrOp

address operator

CIndOp

indirection operator

CPlusOp

prefix plus

CMinOp

prefix minus

CCompOp

one's complement

CNegOp

logical negation

Instances

Instances details
Eq CUnaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

(==) :: CUnaryOp -> CUnaryOp -> Bool

(/=) :: CUnaryOp -> CUnaryOp -> Bool

Data CUnaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CUnaryOp -> c CUnaryOp

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CUnaryOp

toConstr :: CUnaryOp -> Constr

dataTypeOf :: CUnaryOp -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CUnaryOp)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CUnaryOp)

gmapT :: (forall b. Data b => b -> b) -> CUnaryOp -> CUnaryOp

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CUnaryOp -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CUnaryOp -> r

gmapQ :: (forall d. Data d => d -> u) -> CUnaryOp -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CUnaryOp -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CUnaryOp -> m CUnaryOp

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CUnaryOp -> m CUnaryOp

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CUnaryOp -> m CUnaryOp

Ord CUnaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

compare :: CUnaryOp -> CUnaryOp -> Ordering

(<) :: CUnaryOp -> CUnaryOp -> Bool

(<=) :: CUnaryOp -> CUnaryOp -> Bool

(>) :: CUnaryOp -> CUnaryOp -> Bool

(>=) :: CUnaryOp -> CUnaryOp -> Bool

max :: CUnaryOp -> CUnaryOp -> CUnaryOp

min :: CUnaryOp -> CUnaryOp -> CUnaryOp

Show CUnaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

showsPrec :: Int -> CUnaryOp -> ShowS

show :: CUnaryOp -> String

showList :: [CUnaryOp] -> ShowS

Generic CUnaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

Associated Types

type Rep CUnaryOp :: Type -> Type

Methods

from :: CUnaryOp -> Rep CUnaryOp x

to :: Rep CUnaryOp x -> CUnaryOp

NFData CUnaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

Methods

rnf :: CUnaryOp -> ()

Pretty CUnaryOp # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CUnaryOp -> Doc #

prettyPrec :: Int -> CUnaryOp -> Doc #

type Rep CUnaryOp # 
Instance details

Defined in Language.C.Syntax.Ops

type Rep CUnaryOp = D1 ('MetaData "CUnaryOp" "Language.C.Syntax.Ops" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (((C1 ('MetaCons "CPreIncOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CPreDecOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CPostIncOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CPostDecOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CAdrOp" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "CIndOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CPlusOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CMinOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CCompOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CNegOp" 'PrefixI 'False) (U1 :: Type -> Type)))))

type CBuiltin = CBuiltinThing NodeInfo #

GNU Builtins, which cannot be typed in C99

data CBuiltinThing a #

Constructors

CBuiltinVaArg (CExpression a) (CDeclaration a) a
(expr, type)
CBuiltinOffsetOf (CDeclaration a) [CPartDesignator a] a
(type, designator-list)
CBuiltinTypesCompatible (CDeclaration a) (CDeclaration a) a
(type,type)
CBuiltinConvertVector (CExpression a) (CDeclaration a) a
(expr, type)

Instances

Instances details
Functor CBuiltinThing # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CBuiltinThing a -> CBuiltinThing b

(<$) :: a -> CBuiltinThing b -> CBuiltinThing a

Annotated CBuiltinThing # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CBuiltinThing a -> a #

amap :: (a -> a) -> CBuiltinThing a -> CBuiltinThing a #

Pretty CBuiltin # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CBuiltin -> Doc #

prettyPrec :: Int -> CBuiltin -> Doc #

Data a => Data (CBuiltinThing a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CBuiltinThing a -> c (CBuiltinThing a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CBuiltinThing a)

toConstr :: CBuiltinThing a -> Constr

dataTypeOf :: CBuiltinThing a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CBuiltinThing a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CBuiltinThing a))

gmapT :: (forall b. Data b => b -> b) -> CBuiltinThing a -> CBuiltinThing a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CBuiltinThing a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CBuiltinThing a -> r

gmapQ :: (forall d. Data d => d -> u) -> CBuiltinThing a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CBuiltinThing a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CBuiltinThing a -> m (CBuiltinThing a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CBuiltinThing a -> m (CBuiltinThing a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CBuiltinThing a -> m (CBuiltinThing a)

Show a => Show (CBuiltinThing a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CBuiltinThing a -> ShowS

show :: CBuiltinThing a -> String

showList :: [CBuiltinThing a] -> ShowS

Generic (CBuiltinThing a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CBuiltinThing a) :: Type -> Type

Methods

from :: CBuiltinThing a -> Rep (CBuiltinThing a) x

to :: Rep (CBuiltinThing a) x -> CBuiltinThing a

NFData a => NFData (CBuiltinThing a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CBuiltinThing a -> ()

CNode t1 => Pos (CBuiltinThing t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CBuiltinThing t1 -> Position #

CNode t1 => CNode (CBuiltinThing t1) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CBuiltinThing a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CBuiltinThing a) = D1 ('MetaData "CBuiltinThing" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) ((C1 ('MetaCons "CBuiltinVaArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: C1 ('MetaCons "CBuiltinOffsetOf" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CPartDesignator a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))) :+: (C1 ('MetaCons "CBuiltinTypesCompatible" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: C1 ('MetaCons "CBuiltinConvertVector" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CExpression a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CDeclaration a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))))

Constants

type CConst = CConstant NodeInfo #

C constant (K&R A2.5 & A7.2)

type CStrLit = CStringLiteral NodeInfo #

Attributed string literals

liftStrLit :: CStringLiteral a -> CConstant a #

Lift a string literal to a C constant

data CConstant a #

Instances

Instances details
Functor CConstant # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CConstant a -> CConstant b

(<$) :: a -> CConstant b -> CConstant a

Annotated CConstant # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CConstant a -> a #

amap :: (a -> a) -> CConstant a -> CConstant a #

Pretty CConst # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CConst -> Doc #

prettyPrec :: Int -> CConst -> Doc #

Data a => Data (CConstant a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CConstant a -> c (CConstant a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CConstant a)

toConstr :: CConstant a -> Constr

dataTypeOf :: CConstant a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CConstant a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CConstant a))

gmapT :: (forall b. Data b => b -> b) -> CConstant a -> CConstant a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CConstant a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CConstant a -> r

gmapQ :: (forall d. Data d => d -> u) -> CConstant a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CConstant a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CConstant a -> m (CConstant a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CConstant a -> m (CConstant a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CConstant a -> m (CConstant a)

Show a => Show (CConstant a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CConstant a -> ShowS

show :: CConstant a -> String

showList :: [CConstant a] -> ShowS

Generic (CConstant a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CConstant a) :: Type -> Type

Methods

from :: CConstant a -> Rep (CConstant a) x

to :: Rep (CConstant a) x -> CConstant a

NFData a => NFData (CConstant a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CConstant a -> ()

CNode t1 => Pos (CConstant t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CConstant t1 -> Position #

CNode t1 => CNode (CConstant t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

nodeInfo :: CConstant t1 -> NodeInfo #

Generic1 CConstant # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CConstant :: k -> Type

Methods

from1 :: forall (a :: k). CConstant a -> Rep1 CConstant a

to1 :: forall (a :: k). Rep1 CConstant a -> CConstant a

type Rep (CConstant a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CConstant a) = D1 ('MetaData "CConstant" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) ((C1 ('MetaCons "CIntConst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInteger) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CCharConst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CChar) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) :+: (C1 ('MetaCons "CFloatConst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CFloat) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "CStrConst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))
type Rep1 CConstant # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CConstant = D1 ('MetaData "CConstant" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) ((C1 ('MetaCons "CIntConst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInteger) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CCharConst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CChar) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) :+: (C1 ('MetaCons "CFloatConst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CFloat) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1) :+: C1 ('MetaCons "CStrConst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))

data CStringLiteral a #

Constructors

CStrLit CString a 

Instances

Instances details
Functor CStringLiteral # 
Instance details

Defined in Language.C.Syntax.AST

Methods

fmap :: (a -> b) -> CStringLiteral a -> CStringLiteral b

(<$) :: a -> CStringLiteral b -> CStringLiteral a

Annotated CStringLiteral # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CStringLiteral a -> a #

amap :: (a -> a) -> CStringLiteral a -> CStringLiteral a #

Pretty CStrLit # 
Instance details

Defined in Language.C.Pretty

Methods

pretty :: CStrLit -> Doc #

prettyPrec :: Int -> CStrLit -> Doc #

Data a => Data (CStringLiteral a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CStringLiteral a -> c (CStringLiteral a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CStringLiteral a)

toConstr :: CStringLiteral a -> Constr

dataTypeOf :: CStringLiteral a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CStringLiteral a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CStringLiteral a))

gmapT :: (forall b. Data b => b -> b) -> CStringLiteral a -> CStringLiteral a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CStringLiteral a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CStringLiteral a -> r

gmapQ :: (forall d. Data d => d -> u) -> CStringLiteral a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CStringLiteral a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CStringLiteral a -> m (CStringLiteral a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CStringLiteral a -> m (CStringLiteral a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CStringLiteral a -> m (CStringLiteral a)

Show a => Show (CStringLiteral a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

showsPrec :: Int -> CStringLiteral a -> ShowS

show :: CStringLiteral a -> String

showList :: [CStringLiteral a] -> ShowS

Generic (CStringLiteral a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep (CStringLiteral a) :: Type -> Type

Methods

from :: CStringLiteral a -> Rep (CStringLiteral a) x

to :: Rep (CStringLiteral a) x -> CStringLiteral a

NFData a => NFData (CStringLiteral a) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CStringLiteral a -> ()

CNode t1 => Pos (CStringLiteral t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CStringLiteral t1 -> Position #

CNode t1 => CNode (CStringLiteral t1) # 
Instance details

Defined in Language.C.Syntax.AST

Generic1 CStringLiteral # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep1 CStringLiteral :: k -> Type

Methods

from1 :: forall (a :: k). CStringLiteral a -> Rep1 CStringLiteral a

to1 :: forall (a :: k). Rep1 CStringLiteral a -> CStringLiteral a

type Rep (CStringLiteral a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep (CStringLiteral a) = D1 ('MetaData "CStringLiteral" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CStrLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type Rep1 CStringLiteral # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CStringLiteral = D1 ('MetaData "CStringLiteral" "Language.C.Syntax.AST" "language-c-0.8.3-3RMI1eUSER9JvM96Hmahee" 'False) (C1 ('MetaCons "CStrLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

Annoated type class

class Functor ast => Annotated ast where #

All AST nodes are annotated. Inspired by the Annotated class of Niklas Broberg's haskell-src-exts package. In principle, we could have Copointed superclass instead of ann, for the price of another dependency.

Methods

annotation :: ast a -> a #

get the annotation of an AST node

amap :: (a -> a) -> ast a -> ast a #

change the annotation (non-recursively) of an AST node. Use fmap for recursively modifying the annotation.

Instances

Instances details
Annotated CStringLiteral # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CStringLiteral a -> a #

amap :: (a -> a) -> CStringLiteral a -> CStringLiteral a #

Annotated CConstant # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CConstant a -> a #

amap :: (a -> a) -> CConstant a -> CConstant a #

Annotated CBuiltinThing # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CBuiltinThing a -> a #

amap :: (a -> a) -> CBuiltinThing a -> CBuiltinThing a #

Annotated CExpression # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CExpression a -> a #

amap :: (a -> a) -> CExpression a -> CExpression a #

Annotated CAttribute # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CAttribute a -> a #

amap :: (a -> a) -> CAttribute a -> CAttribute a #

Annotated CPartDesignator # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CPartDesignator a -> a #

amap :: (a -> a) -> CPartDesignator a -> CPartDesignator a #

Annotated CInitializer # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CInitializer a -> a #

amap :: (a -> a) -> CInitializer a -> CInitializer a #

Annotated CEnumeration # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CEnumeration a -> a #

amap :: (a -> a) -> CEnumeration a -> CEnumeration a #

Annotated CStructureUnion # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CStructureUnion a -> a #

amap :: (a -> a) -> CStructureUnion a -> CStructureUnion a #

Annotated CAlignmentSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CFunctionSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CTypeQualifier # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CTypeQualifier a -> a #

amap :: (a -> a) -> CTypeQualifier a -> CTypeQualifier a #

Annotated CTypeSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CTypeSpecifier a -> a #

amap :: (a -> a) -> CTypeSpecifier a -> CTypeSpecifier a #

Annotated CStorageSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CDeclarationSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CCompoundBlockItem # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CAssemblyOperand # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CAssemblyOperand a -> a #

amap :: (a -> a) -> CAssemblyOperand a -> CAssemblyOperand a #

Annotated CAssemblyStatement # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CStatement # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CStatement a -> a #

amap :: (a -> a) -> CStatement a -> CStatement a #

Annotated CDerivedDeclarator # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CDeclarator # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CDeclarator a -> a #

amap :: (a -> a) -> CDeclarator a -> CDeclarator a #

Annotated CDeclaration # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CDeclaration a -> a #

amap :: (a -> a) -> CDeclaration a -> CDeclaration a #

Annotated CFunctionDef # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CFunctionDef a -> a #

amap :: (a -> a) -> CFunctionDef a -> CFunctionDef a #

Annotated CExternalDeclaration # 
Instance details

Defined in Language.C.Syntax.AST

Annotated CTranslationUnit # 
Instance details

Defined in Language.C.Syntax.AST

Methods

annotation :: CTranslationUnit a -> a #

amap :: (a -> a) -> CTranslationUnit a -> CTranslationUnit a #