summaryrefslogtreecommitdiff
path: root/src/sail.ml
diff options
context:
space:
mode:
authorPeter Sewell2017-02-09 10:14:27 +0000
committerPeter Sewell2017-02-09 10:14:27 +0000
commitca07e36d5681c3242f1bb200b3a537c0c39cd23c (patch)
tree4303e424e02a3250e4d9523b49b07ce833289ce5 /src/sail.ml
parent517081c715f4541f4c6c516d2590a011fe00b1ef (diff)
group initial type environment into meaningful sections; pretty-print in user-readable way
Diffstat (limited to 'src/sail.ml')
-rw-r--r--src/sail.ml17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/sail.ml b/src/sail.ml
index 8afd1f78..fa5a5a06 100644
--- a/src/sail.ml
+++ b/src/sail.ml
@@ -107,12 +107,17 @@ let main() =
else if !(opt_print_initial_env) then
let ppd_initial_typ_env =
String.concat ""
- (List.map
- (function (id,tannot) ->
- id ^ " : " ^
- Pretty_print.pp_format_annot_ascii tannot
- ^ "\n")
- (Type_internal.Envmap.to_list Type_internal.initial_typ_env)) in
+ (List.map
+ (function (comment,tenv) ->
+ "(* "^comment^" *)\n" ^
+ String.concat ""
+ (List.map
+ (function (id,tannot) ->
+ id ^ " : " ^
+ Pretty_print.pp_format_annot_ascii tannot
+ ^ "\n")
+ tenv))
+ Type_internal.initial_typ_env_list) in
Printf.printf "%s" ppd_initial_typ_env ;
else