Implement the "simple typechecker", which avoids HM inference

This commit is contained in:
Patrick Walton
2010-07-12 19:39:29 -07:00
parent 91b4cae8da
commit c96f0bf738
7 changed files with 860 additions and 1559 deletions

View File

@@ -5,7 +5,7 @@ type operator[T, U] = fn(&T) -> U;
fn option_map[T, U](&operator[T, U] f, &option[T] opt) -> option[U] {
alt (opt) {
case (some[T](x)) {
ret some[U](f[T, U](x));
ret some[U](f(x));
}
case (none[T]()) {
ret none[U]();