From 3406e50f3f4acd5c3535d0e324e5e2e00ba76759 Mon Sep 17 00:00:00 2001 From: Robert Norton Date: Mon, 8 May 2017 12:33:50 +0100 Subject: add error messages for unhandled pattern match nodes in ocaml pretty printer. --- src/pretty_print_ocaml.ml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/pretty_print_ocaml.ml b/src/pretty_print_ocaml.ml index 94c524c2..0ce8d782 100644 --- a/src/pretty_print_ocaml.ml +++ b/src/pretty_print_ocaml.ml @@ -183,6 +183,9 @@ let doc_pat_ocaml = | _ -> non_bit_print ()) | P_tup pats -> parens (separate_map comma_sp pat pats) | P_list pats -> brackets (separate_map semi pat pats) (*Never seen but easy in ocaml*) + | P_record _ -> raise (Reporting_basic.err_unreachable l "unhandled record pattern") + | P_vector_indexed _ -> raise (Reporting_basic.err_unreachable l "unhandled vector_indexed pattern") + | P_vector_concat _ -> raise (Reporting_basic.err_unreachable l "unhandled vector_concat pattern") in pat let doc_exp_ocaml, doc_let_ocaml = -- cgit v1.2.3