mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-09 20:55:39 -05:00
minor change in term tracer
This commit is contained in:
parent
27b0374c62
commit
ca3262eac3
2 changed files with 6 additions and 3 deletions
|
|
@ -33,7 +33,7 @@ let emit (self : t) (t : T.t) : term_ref =
|
|||
| T.E_bound_var v -> "Tv", V.(list [ int (Bvar.idx v); loop' v.bv_ty ])
|
||||
| T.E_app (f, a) -> "T@", V.(list [ loop' f; loop' a ])
|
||||
| T.E_type i -> "Ty", V.int i
|
||||
| T.E_const ({ Const.c_ty; _ } as const) ->
|
||||
| T.E_const const ->
|
||||
let tag, view = Const.ser ~ser_t:loop' const in
|
||||
( "Tc",
|
||||
let fields =
|
||||
|
|
@ -41,7 +41,7 @@ let emit (self : t) (t : T.t) : term_ref =
|
|||
[]
|
||||
else
|
||||
[ "v", view ])
|
||||
@ [ "ty", loop' c_ty; "tag", V.string tag ]
|
||||
@ [ "tag", V.string tag ]
|
||||
in
|
||||
V.dict_of_list fields )
|
||||
| T.E_app_fold { f; args; acc0 } ->
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
open Sidekick_core_logic
|
||||
module Tr = Sidekick_trace
|
||||
|
||||
type term_ref = private Tr.entry_id
|
||||
type term_ref = Tr.entry_id
|
||||
|
||||
type Tr.entry_view +=
|
||||
private
|
||||
|
|
@ -25,6 +25,9 @@ type Tr.entry_view +=
|
|||
type t
|
||||
|
||||
val create : sink:Tr.Sink.t -> unit -> t
|
||||
(** [create ~sink ()] makes a tracer that will write terms
|
||||
into the given sink. *)
|
||||
|
||||
val emit : t -> Term.t -> term_ref
|
||||
val emit' : t -> Term.t -> unit
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue