crisp-typeck 1.7.2

HM-style type inference and constraint solving (spec §3.4)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crisp_typeck::{TypeChecker, format_sig};
use std::path::PathBuf;

fn hello_root() -> PathBuf {
    PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../examples/hello")
}

#[test]
fn infer_hello_signatures() {
    let typed = TypeChecker::check_crate(&hello_root()).expect("typecheck hello");
    let mut lines: Vec<String> = typed.signatures.values().map(format_sig).collect();
    lines.sort();
    insta::assert_debug_snapshot!(lines);
}