hakaru-0.3.0: A probabilistic programming language

CopyrightCopyright (c) 2016 the Hakaru team
LicenseBSD3
Maintainerzsulliva@indiana.edu
Stabilityexperimental
PortabilityGHC-only
Safe HaskellNone
LanguageHaskell2010

Language.Hakaru.CodeGen.Types

Description

Provides tools for building C Types from Hakaru types

Synopsis

Documentation

datumName :: Sing (a :: [[HakaruFun]]) -> String Source #

datumProd and datumSum use a store of names, which needs to match up with the names used when they are assigned and printed datumDeclaration declares struct internally datumStruct declares struct definitions externally

datumName provides a unique name to identify a struct type

functionDef :: Sing (a :: Hakaru) -> Ident -> [CDecl] -> [CDecl] -> [CStat] -> CFunDef Source #

datumSum :: Sing (a :: [[HakaruFun]]) -> Ident -> CDecl Source #

buildType :: Sing (a :: Hakaru) -> [CTypeSpec] Source #

buildType function do the work of describing how the Hakaru type will be stored in memory. Arrays needed their own declaration function for their arity