hakaru-0.7.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

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

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

closureStructure Source #

Arguments

:: forall (a :: Hakaru) xs. [SomeVariable (KindOf a)]

free variables

-> List1 Variable (xs :: [Hakaru])

function arguments

-> Ident

identifier of function

-> Sing a

function return type

-> CExtDecl 

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

callStruct :: String -> CTypeSpec Source #

callStruct will give the type spec calling a struct we have already declared externally