Commit 521a5685 authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Revert "Partially revert commit 46a5262a (only...

Revert "Partially revert commit 46a5262a (only file typing/typer.ml) to make balance type (in toplevel). This should be investigated more thoroughly."

This partial revert allows us to typecheck the wrong version of balance.

This reverts commit b98abca3.
parent 27af6a8f
...@@ -395,8 +395,8 @@ module IType = struct ...@@ -395,8 +395,8 @@ module IType = struct
let l = ref [] in let l = ref [] in
for i=0 to (Array.length pargs) - 1 do for i=0 to (Array.length pargs) - 1 do
try try
let tt = typ ~err:(fun s -> Error s) (derecurs env a.(i)) in let err s = Error s in
l := (pargs.(i), tt)::!l l := (pargs.(i), typ ~err (derecurs env a.(i)))::!l
with with
|Error s -> raise_loc_generic loc s |Error s -> raise_loc_generic loc s
|_ -> assert false |_ -> assert false
...@@ -469,9 +469,9 @@ module IType = struct ...@@ -469,9 +469,9 @@ module IType = struct
(U.to_string v) (U.to_string v)
); );
let al = let al =
let a = Array.make (List.length pl) (Var.mk "dummy")in let a = Array.make (List.length pl) (Var.mk "dummy") in
(* XXX here I use pervasive.compare instead of string compare *) (* List.iteri (fun i v -> a.(i) <- (List.assoc (U.to_string v) vars)) pl; *)
List.iteri (fun i v -> a.(i) <- (List.assoc (U.to_string v) vars)) pl; List.iteri (fun i v -> a.(i) <- Var.mk (Ident.U.to_string v)) pl;
a a
in in
(v',t,al) (v',t,al)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment