package memtrace_viewer
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Interactive memory profiler based on Memtrace
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=0d9b7ddf94f9cf090930a36468abd4f4ca40c5618ec02dbbc6fd47fb0572433d
doc/src/memtrace_viewer.client/with_interpreter.ml.html
Source file with_interpreter.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41open! Core open Bonsai_web module Interpreter = struct type ('value, 'action, 'context) t = value:'value -> context:'context -> 'action -> unit Effect.t end module Input = struct type ('value, 'context) t = { value : 'value ; context : 'context } end type ('value, 'action) t = { value : 'value ; run_action : 'action -> unit Effect.t } let component ~interpret ~input = let open Bonsai.Let_syntax in let%sub Input.{ value; context = _ }, run_action = Bonsai.wrap () ~equal:[%equal: Unit.t] ~default_model:() ~apply_action:(fun apply_action_context (Input.{ value; context }, _) () action -> Bonsai.Apply_action_context.schedule_event apply_action_context (interpret ~value ~context action)) ~f:(fun _ inject -> let%sub input = input ~run_action:inject in let%arr input = input and run_action = inject in input, run_action) in let%arr value = value and run_action = run_action in { value; run_action } ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>