Commit c31e7efd authored by Julien Lopez's avatar Julien Lopez

Fix in typer

parent 3f1ff11d
......@@ -4,7 +4,7 @@ let fun f ( <a>l : T ) : Int = aux l;;
let fun aux ([('A)*] -> Int)
| [] -> 0
| (x,r) -> (aux r);;
| (_,r) -> (aux r);;
let a = f <a>[ 10 15 20 ];;
let b = f <a>[ 'a' 'b' 'c' ];;
......@@ -947,13 +947,13 @@ and type_check' loc env ed constr precise = match ed with
| Apply (e1,e2) ->
let t1 = type_check env e1 Types.Arrow.any true in
let t1arrow = Types.Arrow.get t1 in
let t1 = Types.Positive.substitutefree t1 in
(* t [_delta 0 -> 1 *)
begin try ignore(Types.Tallying.tallying ~delta:env.delta [(t1,Types.Arrow.any)])
with Types.Tallying.UnSatConstr _ -> raise_loc loc (Constraint (t1, Types.Arrow.any)) end;
let t1arrow = Types.Arrow.get t1 in
let dom = Types.Arrow.domain(t1arrow) in
let res =
if not(Types.is_closed env.delta dom) then
......
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