Skip to content

Commit 536b024

Browse files
committed
debuggin
1 parent 01213b3 commit 536b024

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ all:
33
ocaml setup.ml -configure
44
ocaml setup.ml -build
55

6+
clean:
7+
rm -r _build
8+
69
install:
710
./remove_existing.sh
811
ocaml setup.ml -install

src/frp.ml

+3
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,14 @@ module Stream = struct
358358
let zip = zip_with ~f:(fun x y -> (x, y))
359359

360360
let zip_many ts ~f =
361+
print_endline "Stream.zip_many";
361362
let on_listeners = Inttbl.create () in
362363
let passive_listeners = Inttbl.create () in
363364
let qs = Array.init (Array.length ts) ~f:(fun _ -> Queue.create ()) in
364365
let parents = Array.mapi ts ~f:(fun i t ->
366+
print_endline ("Stream.zip_many: mapi with i = " ^ string_of_int i);
365367
add_off_listener t (fun x ->
368+
print_endline "Stream.zip_many: listener";
366369
Queue.enqueue qs.(i) x;
367370
if Array.for_all qs ~f:(fun q -> Queue.length q > 0)
368371
then notify_all [|on_listeners; passive_listeners|] (f (Array.map ~f:Queue.dequeue_exn qs)))

src/test.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ let switch_test =
1414
let s = match lbl with `A -> "A" | `B -> "B" | `C -> "C" in
1515
map (ticks 20.) ~f:(fun _ -> s))))
1616

17-
let () = Frp.Stream.iter switch_test ~f:Core.println |> ignore
17+
let () = Frp.Stream.iter switch_test ~f:print_endline |> ignore

0 commit comments

Comments
 (0)