ocaml: phase 5 HM let-rec + cons / append op types (+6 tests, 357 total)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 28s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 28s
ocaml-infer-let-rec pre-binds the function name to a fresh tv before
inferring rhs (which may recursively call the name), unifies the
inferred rhs type with the tv, generalizes, then infers body.
Builtin env types :: : 'a -> 'a list -> 'a list and @ : 'a list ->
'a list -> 'a list — needed because :op compiles to (:app (:app (:var
OP) L) R) and previously these var lookups failed.
Examples now infer:
let rec fact n = if ... in fact : Int -> Int
let rec len lst = ... in len : 'a list -> Int
let rec map f xs = ... in map : ('a -> 'b) -> 'a list -> 'b list
1 :: [2; 3] : Int list
let rec sum lst = ... in sum [1;2;3] : Int
Scoreboard refreshed: 358/358 across 14 suites.
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
{
|
||||
"suites": {
|
||||
"eval-core": {"pass": 48, "fail": 0},
|
||||
"eval-core": {"pass": 50, "fail": 0},
|
||||
"let-and": {"pass": 3, "fail": 0},
|
||||
"misc": {"pass": 52, "fail": 0},
|
||||
"parser": {"pass": 87, "fail": 0},
|
||||
"misc": {"pass": 61, "fail": 0},
|
||||
"parser": {"pass": 93, "fail": 0},
|
||||
"phase1-params": {"pass": 2, "fail": 0},
|
||||
"phase2-exn": {"pass": 8, "fail": 0},
|
||||
"phase2-function": {"pass": 3, "fail": 0},
|
||||
"phase2-loops": {"pass": 4, "fail": 0},
|
||||
"phase2-refs": {"pass": 6, "fail": 0},
|
||||
"phase3-adt": {"pass": 19, "fail": 0},
|
||||
"phase3-adt": {"pass": 24, "fail": 0},
|
||||
"phase4-modules": {"pass": 12, "fail": 0},
|
||||
"phase5-hm": {"pass": 19, "fail": 0},
|
||||
"phase6-stdlib": {"pass": 39, "fail": 0},
|
||||
"phase5-hm": {"pass": 31, "fail": 0},
|
||||
"phase6-stdlib": {"pass": 43, "fail": 0},
|
||||
"tokenize": {"pass": 18, "fail": 0}
|
||||
},
|
||||
"total_pass": 320,
|
||||
"total_pass": 358,
|
||||
"total_fail": 0,
|
||||
"total": 320
|
||||
"total": 358
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user