Skip to content

Commit

Permalink
fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
joongwon committed Mar 2, 2025
1 parent 70b489f commit fbe50f5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 7 additions & 4 deletions bin/js/recorder/recorder.ml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,18 @@ let leaf : const -> tree = function

let rec tree : Concrete_domains.tree -> tree = function
| Leaf k -> leaf k
| List l -> list l
| Path p -> path p

and list (ts : Concrete_domains.tree list) : tree =
{ path = ""; name = "..."; children = List.map ts ~f:tree }

and path (pt : Path.t) : tree =
let { part_view; children } = perform (Lookup_ent pt) in
let name = match part_view with Node node -> node.comp_spec.comp in
let { comp_spec = { comp; _ }; children; _ } = perform (Lookup_ent pt) in
{
path = pt |> Path.sexp_of_t |> Sexp.to_string;
name;
children = children |> Snoc_list.to_list |> List.map ~f:tree;
name = comp;
children = [ tree children ];
}

let event_h (type a b) (f : a -> b) (x : a) :
Expand Down
11 changes: 7 additions & 4 deletions bin/native/report_box_recorder/report_box_recorder.ml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ let leaf : const -> B.t = function
| Int i -> B.int i
| String s -> B.text s

let rec tree : tree -> B.t = function Leaf k -> leaf k | Path p -> path p
let rec tree : tree -> B.t = function
| Leaf k -> leaf k
| List l -> list l
| Path p -> path p

and list (ts : tree list) : B.t = B.hlist_map (fun t -> tree t |> align) ts

and path (pt : Path.t) : B.t =
let { comp_spec = { comp; arg; _ }; dec; st_store; eff_q; children } =
Expand Down Expand Up @@ -59,9 +64,7 @@ and path (pt : Path.t) : B.t =
B.(hlist [ text "eff"; vlist eff_q ])
in
let part_view_box = B.vlist [ comp_spec_box; dec_box; stt_box; eff_box ] in
let children =
Snoc_list.to_list children |> B.hlist_map (fun t -> tree t |> align)
in
let children = tree children in
B.(vlist [ part_view_box; children ] |> frame)

let emp_recording = []
Expand Down

0 comments on commit fbe50f5

Please sign in to comment.