hakaru-0.3.0: A probabilistic programming language

CopyrightCopyright (c) 2016 the Hakaru team
LicenseBSD3
Maintainerzsulliva@indiana.edu
Stabilityexperimental
PortabilityGHC-only The purpose of the wrapper is to intelligently wrap CStatements
Safe HaskellNone
LanguageHaskell2010

Language.Hakaru.CodeGen.Wrapper

Description

into CFunctions and CProgroms to be printed by hkc

Synopsis

Documentation

wrapProgram Source #

Arguments

:: TypedAST (TrivialABT Term)

Some Hakaru ABT

-> Maybe String

Maybe an output name

-> PrintConfig

show weights?

-> CodeGen () 

wrapProgram is the top level C codegen. Depending on the type a program will have a different construction. It will produce an effect in the CodeGenMonad that will produce a standalone C file containing the CPP includes, struct declarations, functions, and sometimes a main.