ivory-0.1.0.3: Safe embedded C programming.

Safe HaskellSafe
LanguageHaskell2010

Ivory.Language.Syntax.Concrete.ParseAST

Synopsis

Documentation

data ProcDef Source

Constructors

ProcDef 

Fields

procTy :: Type

Return type

procSym :: FnSym

Function name

procArgs :: [(Type, Var)]

Argument types

procStmt :: [Stmt]

Body

procPrePost :: [PrePost]
 
procLoc :: SrcLoc
 

data IncludeProc Source

We distinguish the name used from the name imported so the same symbol can be used twice at different types. (E.g., printf).

Constructors

IncludeProc 

Fields

procInclTy :: Type

Return type

procInclSym :: FnSym

Function name used

procInclArgs :: [(Type, Var)]

Argument types XXX add later , procInclPrePost :: [PrePost]

procIncl :: (String, FnSym)

Header to import from and function name imported

procInclLoc :: SrcLoc
 

data Type Source

Constructors

TyVoid

Unit type

TyInt IntSize

Signed ints

TyWord WordSize

Unsigned ints

TyBool

Booleans

TyChar

Characters

TyFloat

Floats

TyDouble

Doubles XXX | TyPtr Type -- ^ Pointers

TyIx Integer

Index type

TyString

Static strings

TyStored Type

References

TyStruct String

Structures

TyArray Type (Either String Integer)

Arrays of fixed length (can be a macro or integer)

TyRef Scope Type

References

TyConstRef Scope Type

Constant References

TySynonym String

Type synonym

LocTy (Located Type) 

data Scope Source

Constructors

Stack (Maybe TypeVar)

Stack allocated. If no type variable is provided, a fresh one is constructed.

Global

Globally allocated

PolyMem (Maybe TypeVar)

Either allocation. If no type variable is provided, a fresh one is constructed.

data BitTy Source

Basic type representation allowed in bit definitions.

data Constr Source

A constructor definition within a "bitdata".

data LayoutItem Source

One element of a bit data constructor layout.

data BitLiteral Source

A bit integer literal with a known or unknown size.

data BitField Source

A record-like field defined within a "bitdata" constructor. If the name is an underscore, we name it with Nothing.