Project

General

Profile

Revision 54ae8ac7 src/typing.ml

View differences:

src/typing.ml
423 423
  let tins, touts = split_arrow tfun in
424 424
  let tins = type_list_of_type tins in
425 425
  let args = expr_list_of_expr args in
426
  List.iter2 (type_subtyping_arg env in_main const) args tins;
426
  if List.length args <> List.length tins then
427
    raise (Error (loc, WrongArity (List.length args, List.length tins)))
428
  else
429
    List.iter2 (type_subtyping_arg env in_main const) args tins;
427 430
  touts
428 431

  
429 432
(** [type_expr env in_main expr] types expression [expr] in environment

Also available in: Unified diff