summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlasdair Armstrong2017-07-25 18:07:33 +0100
committerAlasdair Armstrong2017-07-25 18:07:33 +0100
commit879ad3f2bb476abb03ad441de23efde9a9a70cd0 (patch)
tree456b0ebdf235a2fa653b909357c74f188a8feec7 /src
parente68bc2728db442d531f431aa050768e18486849d (diff)
Fixed bug where strings were not escaped correctly within string
literals when pretty printing sail.
Diffstat (limited to 'src')
-rw-r--r--src/pretty_print_sail.ml2
-rw-r--r--src/type_check.mli1
2 files changed, 2 insertions, 1 deletions
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