pub fn codegen(
    typeenv: &TypeEnv,
    termenv: &TermEnv,
    tries: &BTreeMap<TermId, TrieNode>,
    options: &CodegenOptions
) -> String
Expand description

Emit Rust source code for the given type and term environments.

Examples found in repository?
src/compile.rs (line 14)
9
10
11
12
13
14
15
pub fn compile(defs: &ast::Defs, options: &codegen::CodegenOptions) -> Result<String, Errors> {
    let mut typeenv = sema::TypeEnv::from_ast(defs)?;
    let termenv = sema::TermEnv::from_ast(&mut typeenv, defs)?;
    crate::overlap::check(&mut typeenv, &termenv)?;
    let tries = trie::build_tries(&termenv);
    Ok(codegen::codegen(&typeenv, &termenv, &tries, options))
}