From 879ad3f2bb476abb03ad441de23efde9a9a70cd0 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Tue, 25 Jul 2017 18:07:33 +0100 Subject: Fixed bug where strings were not escaped correctly within string literals when pretty printing sail. --- src/pretty_print_sail.ml | 2 +- src/type_check.mli | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/pretty_print_sail.ml b/src/pretty_print_sail.ml index e6162a68..668e791c 100644 --- a/src/pretty_print_sail.ml +++ b/src/pretty_print_sail.ml @@ -106,7 +106,7 @@ let doc_lit (L_aux(l,_)) = | L_bin n -> "0b" ^ n | L_real r -> r | L_undef -> "undefined" - | L_string s -> "\"" ^ s ^ "\"") + | L_string s -> "\"" ^ String.escaped s ^ "\"") let doc_pat, doc_atomic_pat = let rec pat pa = pat_colons pa diff --git a/src/type_check.mli b/src/type_check.mli index 5a237b2f..5f8fd11e 100644 --- a/src/type_check.mli +++ b/src/type_check.mli @@ -159,6 +159,7 @@ val unit_typ : typ val string_typ : typ val real_typ : typ val vector_typ : nexp -> nexp -> order -> typ -> typ +val list_typ : typ -> typ val inc_ord : order val dec_ord : order -- cgit v1.2.3