hakaru-0.3.0: A probabilistic programming language

Safe HaskellNone
LanguageHaskell2010

Language.Hakaru.Parser.SymbolResolve

Synopsis

Documentation

data Symbol a Source #

Constructors

TLam (a -> Symbol a) 
TNeu a 

data Symbol' a Source #

Constructors

TLam' ([a] -> a) 
TNeu' a 

t2 :: (AST -> AST -> AST) -> Symbol AST Source #

t3 :: (AST -> AST -> AST -> AST) -> Symbol AST Source #

symbolResolution :: SymbolTable -> AST' Text -> State Int (AST' (Symbol AST)) Source #

Figure out symbols and types.

normAST :: AST' (Symbol AST) -> AST' (Symbol AST) Source #

Make AST and give unique names for variables.

The logic here is to do normalization by evaluation for our primitives. App inspects its first argument to see if it should do something special. Otherwise App behaves as normal.