hakaru-0.3.0: A probabilistic programming language

CopyrightCopyright (c) 2016 the Hakaru team
LicenseBSD3
Maintainerzsulliva@indiana.edu
Stabilityexperimental
PortabilityGHC-only This module provides a monad for C code generation as well
Safe HaskellNone
LanguageHaskell2010

Language.Hakaru.CodeGen.CodeGenMonad

Description

as some useful helper functions for manipulating it

Synopsis

Documentation

data CG Source #

Constructors

CG 

Fields

declare :: Sing (a :: Hakaru) -> Ident -> CodeGen () Source #

types like SData and SMeasure are impure in that they will produce extra code in the CodeGenMonad while literal types SReal, SInt, SNat, and SProb do not

defineFunction :: Sing (a :: Hakaru) -> Ident -> [CDecl] -> CodeGen () -> CodeGen () Source #

funCG :: CTypeSpec -> Ident -> [CDecl] -> CodeGen () -> CodeGen () Source #

forCG :: CExpr -> CExpr -> CExpr -> CodeGen () -> CodeGen () Source #