let cref_table_of_tr_doc (doc_settings : t_doc_settings) (doc : tr_doc) : t_cref_table = let _ : unit = IO.quiet.contents <- true in match acc_of_tr_doc doc_settings ([] : t_cref_table) ([] : t_nte_table) ([] : t_path) (CREF_TABLE []) doc with | CREF_TABLE table -> check_cref_table doc_settings (List.rev table) | _ -> raise (Error "accumulator output type not identical to accumulator input type")