Commit f1ac0ce0 authored by Andrei Paskevich's avatar Andrei Paskevich
Browse files

fix BadArity reporting

parent 199f168c
......@@ -380,7 +380,7 @@ and dpat_node loc uc env = function
and dpat_args ls loc uc env el pl =
let n = List.length el and m = List.length pl in
if n <> m then error ~loc (BadArity (ls,m,n));
if n <> m then error ~loc (BadArity (ls,n,m));
let rec check_arg env = function
| [], [] ->
env, []
......@@ -438,7 +438,7 @@ and dterm_node ~localize loc uc env = function
(* 0-arity symbol (constant) *)
let s, tyl, ty = specialize_fsymbol x uc in
let n = List.length tyl in
if n > 0 then error ~loc (BadArity (s, 0, n));
if n > 0 then error ~loc (BadArity (s,n,0));
Tapp (s, []), ty
| PPapp (x, tl) when check_highord uc env x tl ->
let tl = apply_highord loc x tl in
......@@ -712,7 +712,7 @@ and dpat_list uc env ty p =
and dtype_args ~localize ls loc uc env el tl =
let n = List.length el and m = List.length tl in
if n <> m then error ~loc (BadArity (ls, m, n));
if n <> m then error ~loc (BadArity (ls,n,m));
let rec check_arg = function
| [], [] ->
[]
......
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