gibbon-0.3: A compiler for operating on serialized data
Safe HaskellSafe-Inferred
LanguageHaskell2010

Gibbon.Passes.Codegen

Description

The final pass of the compiler: generate C code.

Synopsis

Documentation

codegenProg :: Config -> Prog -> IO String Source #

Compile a program to C code that has the side effect of the "gibbon_main" expression in that program.

harvestStructTys :: Prog -> Set [Ty] Source #

Harvest all struct tys. All product types used anywhere in the program.

rewriteReturns :: Tail -> [(Var, Ty)] -> Tail Source #

Replace returns with assignments to a given set of destinations.