Skip to content

Commit

Permalink
add flag print_meta_args
Browse files Browse the repository at this point in the history
  • Loading branch information
fblanqui committed Apr 26, 2024
1 parent 2f54828 commit 5f62c57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/queries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ rewrite engine by reducing η-redexes.
flag "print_contexts" on; // default is off
flag "print_domains" on; // default is off
flag "print_meta_types" on; // default is off
flag "print_meta_args" on; // default is off

.. _print:

Expand Down
6 changes: 5 additions & 1 deletion src/core/print.ml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ let print_meta_types : bool ref =
(** Flag for printing contexts in unification problems. *)
let print_contexts : bool ref = Console.register_flag "print_contexts" false

(** Flag for printing metavariable arguments. *)
let print_meta_args : bool ref = Console.register_flag "print_meta_args" false

let assoc : Pratter.associativity pp = fun ppf assoc ->
match assoc with
| Neither -> ()
Expand Down Expand Up @@ -249,7 +252,8 @@ and term : term pp = fun ppf t ->
| Type -> out ppf "TYPE"
| Kind -> out ppf "KIND"
| Symb(s) -> sym ppf s
| Meta(m,e) -> out ppf "%a%a" meta m env e
| Meta(m,e) ->
if !print_meta_args then out ppf "%a%a" meta m env e else meta ppf m
| Plac(_) -> out ppf "_"
| Patt(_,n,e) -> out ppf "$%a%a" uid n env e
| TEnv(t,e) -> out ppf "$%a%a" term_env t env e
Expand Down

0 comments on commit 5f62c57

Please sign in to comment.