language-c-0.8.2: 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

Contents

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
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

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 :: (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

Generic (CTranslationUnit a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

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

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 #

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.2-KO6GGy0fbH5KZxtBHfA7kD" 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.2-KO6GGy0fbH5KZxtBHfA7kD" 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
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 :: (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

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 #

type Rep (CExternalDeclaration a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CExternalDeclaration # 
Instance details

Defined in Language.C.Syntax.AST

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
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 :: (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

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 #

type Rep (CFunctionDef a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CFunctionDef # 
Instance details

Defined in Language.C.Syntax.AST

data CDeclaration a #

Instances
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 :: (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

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

data CStructTag #

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

Constructors

CStructTag 
CUnionTag 
Instances
Eq CStructTag # 
Instance details

Defined in Language.C.Syntax.AST

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 :: (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

Generic CStructTag # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

type Rep CStructTag :: Type -> Type #

NFData CStructTag # 
Instance details

Defined in Language.C.Syntax.AST

Methods

rnf :: CStructTag -> () #

Pretty CStructTag # 
Instance details

Defined in Language.C.Pretty

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.2-KO6GGy0fbH5KZxtBHfA7kD" False) (C1 (MetaCons "CStructTag" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CUnionTag" PrefixI False) (U1 :: Type -> Type))

data CStructureUnion a #

Instances
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

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 :: (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

Generic (CStructureUnion a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

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

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 #

type Rep (CStructureUnion a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CStructureUnion # 
Instance details

Defined in Language.C.Syntax.AST

data CEnumeration a #

Constructors

CEnum (Maybe Ident) (Maybe [(Ident, Maybe (CExpression a))]) [CAttribute a] a 
Instances
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 :: (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

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 #

type Rep (CEnumeration a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CEnumeration # 
Instance details

Defined in Language.C.Syntax.AST

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
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 :: (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

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 #

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.2-KO6GGy0fbH5KZxtBHfA7kD" 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.2-KO6GGy0fbH5KZxtBHfA7kD" 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
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

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 :: (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

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 #

type Rep (CDeclarationSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CDeclarationSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

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

Instances
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

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 :: (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

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 #

type Rep (CStorageSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

type Rep1 CStorageSpecifier # 
Instance details

Defined in Language.C.Syntax.AST

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
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

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 :: (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

Generic (CTypeSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

Associated Types

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

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 #

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.2-KO6GGy0fbH5KZxtBHfA7kD" 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.2-KO6GGy0fbH5KZxtBHfA7kD" 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
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

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 :: (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

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 #

type Rep (CAlignmentSpecifier a) # 
Instance details

Defined in Language.C.Syntax.AST

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.2-KO6GGy0fbH5KZxtBHfA7kD" False) (C1 (MetaCons "CAlignAsType" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (