Commit af780bcc authored by Pietro Abate's avatar Pietro Abate
Browse files

raise an error instead of a warning on malformed types definitions

parent f5ca7313
......@@ -464,9 +464,10 @@ module IType = struct
warning loc
("This definition yields an empty type for " ^ (U.to_string v));
if (List.length vars) <> (List.length pl) then
warning loc
("Definition of type" ^ (U.to_string v) ^
" contains unused/undeclared type variables");
error loc
(Printf.sprintf "Definition of type %s contains unused/undeclared type variables"
(U.to_string v)
let al =
let a = Array.make (List.length pl) ( "dummy")in
(* XXX here I use instead of string compare *)
......@@ -474,7 +475,7 @@ module IType = struct
) b b'
) (List.rev b) (List.rev b')
List.iter (fun (v,t,al) ->
Types.Print.register_global ("",v, Types.var al) t
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