summaryrefslogtreecommitdiff
path: root/src/pretty_print.ml
diff options
context:
space:
mode:
authorKathy Gray2014-09-09 14:21:30 +0100
committerKathy Gray2014-09-09 14:21:30 +0100
commitd7f2ad0285fb20cf7c96cccffafdaa22211239c1 (patch)
tree887d415d0614eecab0c2b0517b630149da4ad68c /src/pretty_print.ml
parent9760b76fde4184b1ff376b347e09fc936dc9bf59 (diff)
Get more constraints resolving in power.sail
Diffstat (limited to 'src/pretty_print.ml')
-rw-r--r--src/pretty_print.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pretty_print.ml b/src/pretty_print.ml
index b0fdb2dc..714112ad 100644
--- a/src/pretty_print.ml
+++ b/src/pretty_print.ml
@@ -382,6 +382,8 @@ and pp_lem_exp ppf (E_aux(e,(l,annot))) =
(match r.nexp with
| Nconst bi -> fprintf ppf "@[<0>(E_aux (E_lit (L_aux (L_num %a) %a)) (%a, %a))@]"
kwd (string_of_big_int bi) pp_lem_l l pp_lem_l l pp_annot (Base(([],nat_t),Emp_local,[],pure_e))
+ | Nvar v -> fprintf ppf "@[<0>(E_aux (E_id (Id_aux (Id %a) %a)) (%a,%a))@]"
+ kwd v pp_lem_l l pp_lem_l l pp_annot (Base(([],nat_t),Emp_local,[],pure_e))
| _ -> raise (Reporting_basic.err_unreachable l "Internal exp given vector without known length"))
| Tapp("implicit",[TA_nexp r]) ->
(match r.nexp with
@@ -911,8 +913,10 @@ let doc_exp, doc_let =
(match t.t with
| Tapp("vector",[TA_nexp _;TA_nexp r;_;_]) ->
(match r.nexp with
+ | Nvar v -> utf8string v
| Nconst bi -> utf8string (Big_int.string_of_big_int bi)
- | _ -> raise (Reporting_basic.err_unreachable l "Internal exp given vector without known length"))
+ | _ -> raise (Reporting_basic.err_unreachable l
+ ("Internal exp given vector without known length, instead given " ^ n_to_string r)))
| Tapp("implicit",[TA_nexp r]) ->
(match r.nexp with
| Nconst bi -> utf8string (Big_int.string_of_big_int bi)