language-c-0.4.4: Analysis and generation of C code

Safe HaskellNone

Language.C.Analysis.TypeCheck

Synopsis

Documentation

constType :: (MonadCError m, MonadName m) => CConst -> m TypeSource

Determine the type of a constant.

compatible :: Type -> Type -> Either String ()Source

Determine whether two types are compatible.

compositeType :: Type -> Type -> Either String TypeSource

Determine the composite type of two compatible types.

assignCompatible :: CAssignOp -> Type -> Type -> Either String ()Source

Determine whether two types are compatible in an assignment expression.

binopType :: CBinaryOp -> Type -> Type -> Either String TypeSource

Determine the type of a binary operation.

conditionalType :: Type -> Type -> Either String TypeSource

Determine the type of a conditional expression.

fieldType :: (MonadCError m, MonadSymtab m) => NodeInfo -> Ident -> Type -> m TypeSource

Get the type of field m of type t

tagMembers :: (MonadCError m, MonadSymtab m) => NodeInfo -> TagDef -> m [(Ident, Type)]Source

Get all members of a struct, union, or enum, with their types. Collapse fields of anonymous members.

expandAnonymous :: (MonadCError m, MonadSymtab m) => NodeInfo -> (VarName, Type) -> m [(Ident, Type)]Source

Expand an anonymous composite type into a list of member names and their associated types.