ajhc-0.8.0.6: Haskell compiler that produce binary through C language

Safe HaskellNone

C.Generate

Synopsis

Documentation

class Annotate e whereSource

Methods

annotate :: String -> e -> eSource

Instances

data Structure Source

Constructors

Structure 

Fields

structureName :: Name
 
structureFields :: [(Name, Type)]
 
structureNeedsDiscriminator :: Bool

emit a macro that declares a discriminator when needed

structureHasDiscriminator :: Bool

the first field must appear first in the on memory layout, don't move it.

structureAligned :: Bool

this structure needs to be aligned to a pointer boundry, even if it woudn't be otherwise.

basicGCType :: String -> TypeSource

a basic type the garbage collector might want to follow, guarenteed to be the size of a pointer.

class Draw d whereSource

Methods

err :: String -> dSource

drawG :: Draw d => d -> DocSource

generateCSource

Arguments

:: [Function]

functions

-> [Structure]

extra structures

-> (Doc, Doc)

final result

data Type Source

Instances