Skip to content

Commit

Permalink
refactor: add more pp functions for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrinberg committed Sep 17, 2024
1 parent 1e8fff2 commit a9f4892
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/automata.ml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ module E = struct
print_state_rec ch e y)
;;

let _pp ch t = print_state_lst ch [ t ] { id = 0; def = Eps }
let pp ch t = print_state_lst ch [ t ] { id = 0; def = Eps }
end

module Desc = struct
Expand Down Expand Up @@ -345,6 +345,10 @@ module Desc = struct
| TSeq (kind, l, x) :: r -> TSeq (kind, set_idx idx l, x) :: set_idx idx r
| TExp (marks, x) :: r -> TExp (Marks.marks_set_idx marks idx, x) :: set_idx idx r
;;

let[@ocaml.warning "-32"] pp fmt t =
Format.fprintf fmt "[%a]" (Format.pp_print_list ~pp_sep:(Fmt.lit "; ") E.pp) t
;;
end

module State = struct
Expand Down

0 comments on commit a9f4892

Please sign in to comment.