Copyright | Copyright (c) 2016 the Hakaru team |
---|---|
License | BSD3 |
Maintainer | zsulliva@indiana.edu |
Stability | experimental |
Portability | GHC-only The purpose of the wrapper is to intelligently wrap CStatements |
Safe Haskell | None |
Language | Haskell2010 |
into CFunctions and CProgroms to be printed by hkc
- wrapProgram :: TypedAST (TrivialABT Term) -> Maybe String -> PrintConfig -> CodeGen ()
- data PrintConfig = PrintConfig {
- showWeights :: Bool
- showProbInLog :: Bool
Documentation
:: 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.
data PrintConfig Source #