summaryrefslogtreecommitdiff
path: root/src/pretty_print.ml
diff options
context:
space:
mode:
authorKathy Gray2014-11-16 12:28:44 +0000
committerKathy Gray2014-11-16 12:28:44 +0000
commit8da40b0d899545cc359c37fe30877b0c4fad4fb6 (patch)
tree333df195a7b8f535eafa94779dba97b78cd0a9e0 /src/pretty_print.ml
parentcd51e034fc5f744570f70e913d5270bbedc7d42a (diff)
Add overflow checking arithmetic operations. Fix various bugs that this exposed
Of note: Interp_lib.to_num now takes an Unsigned or a Signed constructor, rather than a boolean
Diffstat (limited to 'src/pretty_print.ml')
-rw-r--r--src/pretty_print.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pretty_print.ml b/src/pretty_print.ml
index 98b6f0d8..48855e64 100644
--- a/src/pretty_print.ml
+++ b/src/pretty_print.ml
@@ -241,8 +241,8 @@ let rec pp_format_t t =
| Ttup(tups) -> "(T_tup [" ^ (list_format "; " pp_format_t tups) ^ "])"
| Tapp(i,args) -> "(T_app \"" ^ i ^ "\" (T_args [" ^ list_format "; " pp_format_targ args ^ "]))"
| Tabbrev(ti,ta) -> "(T_abbrev " ^ (pp_format_t ti) ^ " " ^ (pp_format_t ta) ^ ")"
- | Tuvar(_) -> "(T_var (Kid_aux (Var \"fresh_v\") Unknown))"
- | Toptions _ -> "(T_var \"fresh_v\" Unknown)"
+ | Tuvar(_) -> "(T_var \"fresh_v\")"
+ | Toptions _ -> "(T_var \"fresh_v\")"
and pp_format_targ = function
| TA_typ t -> "(T_arg_typ " ^ pp_format_t t ^ ")"
| TA_nexp n -> "(T_arg_nexp " ^ pp_format_n n ^ ")"
@@ -291,7 +291,7 @@ let pp_format_tag = function
let rec pp_format_nes nes =
"[" ^
- (*(list_format "; "
+ (list_format "; "
(fun ne -> match ne with
| LtEq(_,n1,n2) -> "(Nec_lteq " ^ pp_format_n n1 ^ " " ^ pp_format_n n2 ^ ")"
| Eq(_,n1,n2) -> "(Nec_eq " ^ pp_format_n n1 ^ " " ^ pp_format_n n2 ^ ")"
@@ -305,7 +305,7 @@ let rec pp_format_nes nes =
| BranchCons(_,nes_b) ->
"(Nec_branch " ^ (pp_format_nes nes_b) ^ ")"
)
- nes) ^*) "]"
+ nes) ^ "]"
let pp_format_annot = function
| NoTyp -> "Nothing"
@@ -986,11 +986,11 @@ let doc_exp, doc_let =
| LB_val_explicit(ts,pat,e) ->
prefix 2 1
(separate space [string "let"; doc_typscm_atomic ts; doc_atomic_pat pat; equals])
- (exp e)
+ (atomic_exp e)
| LB_val_implicit(pat,e) ->
prefix 2 1
(separate space [string "let"; doc_atomic_pat pat; equals])
- (exp e)
+ (atomic_exp e)
and doc_fexp (FE_aux(FE_Fexp(id,e),_)) = doc_op equals (doc_id id) (exp e)