Revision 6aeb3388 src/typing.ml
src/typing.ml | ||
---|---|---|
670 | 670 |
type_imported_node env nd decl.top_decl_loc |
671 | 671 |
| Consts clist -> |
672 | 672 |
type_top_consts env clist |
673 |
| Type _ |
|
673 | 674 |
| Open _ -> env |
674 | 675 |
|
675 | 676 |
let type_prog env decls = |
... | ... | |
701 | 702 |
uneval_node_generics (nd.node_inputs @ nd.node_outputs) |
702 | 703 |
| ImportedNode nd -> |
703 | 704 |
uneval_node_generics (nd.nodei_inputs @ nd.nodei_outputs) |
704 |
| Consts clist -> () |
|
705 |
| Consts _ |
|
706 |
| Type _ |
|
705 | 707 |
| Open _ -> () |
706 | 708 |
|
707 | 709 |
let uneval_prog_generics prog = |
... | ... | |
727 | 729 |
Types.print_ty Format.std_formatter computed_t;*) |
728 | 730 |
try_unify ~sub:true ~semi:true decl_type_k computed_t Location.dummy_loc |
729 | 731 |
) |
732 |
let check_typedef_top decl = |
|
733 |
match decl.top_decl_desc with |
|
734 |
| Type ty -> |
|
735 |
Format.eprintf "check_typedef %a %a@." Printers.pp_var_type_dec_desc ty.ty_def_desc Printers.pp_var_type_dec_desc (Hashtbl.find type_table (Tydec_const ty.ty_def_id)); |
|
736 |
if coretype_equal ty.ty_def_desc (Hashtbl.find type_table (Tydec_const ty.ty_def_id)) then () |
|
737 |
else raise (Error (decl.top_decl_loc, Type_mismatch ty.ty_def_id)) |
|
738 |
| _ -> () |
|
739 |
|
|
740 |
let check_typedef_compat header = |
|
741 |
List.iter check_typedef_top header |
|
730 | 742 |
|
731 | 743 |
(* Local Variables: *) |
732 | 744 |
(* compile-command:"make -C .." *) |
Also available in: Unified diff