diff options
| author | Robert Norton | 2017-04-10 13:34:14 +0100 |
|---|---|---|
| committer | Shaked Flur | 2017-04-18 13:58:33 +0100 |
| commit | 4d04c1be4f20c7335e4ece28c82018d891cc0233 (patch) | |
| tree | b3db6391eb92415ccd29db87e48ecd3d6ae3fa12 /src | |
| parent | b780e21769e5b037c2dea5a10ffc3695dfd52a18 (diff) | |
Generate runtime error for L_undef. Existing code was broken except for type bit (specifically it caused generated ocaml to fail to type check for an undef number.
Diffstat (limited to 'src')
| -rw-r--r-- | src/pretty_print_ocaml.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pretty_print_ocaml.ml b/src/pretty_print_ocaml.ml index 2d9dc888..2033e3ba 100644 --- a/src/pretty_print_ocaml.ml +++ b/src/pretty_print_ocaml.ml @@ -130,7 +130,7 @@ let doc_lit_ocaml in_pat (L_aux(l,_)) = | L_num i -> "(big_int_of_int " ^ (string_of_int i) ^ ")" | L_hex n -> "(num_to_vec " ^ ("0x" ^ n) ^ ")" (*shouldn't happen*) | L_bin n -> "(num_to_vec " ^ ("0b" ^ n) ^ ")" (*shouldn't happen*) - | L_undef -> "Vundef" + | L_undef -> "failwith \"undef literal not supported\"" (* XXX Undef vectors get handled with to_vec_undef. We could support undef bit but would need to check type. For the moment treat as runtime error. *) | L_string s -> "\"" ^ s ^ "\"") (* typ_doc is the doc for the type being quantified *) |
