My own corner of monopam
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-monitor: enable MDX on lib/monitor.mli

Run mdx on lib/monitor.mli so the {[ ... ]} odoc block now type-checks.

`Monitor.Process.create` takes only `~env` (the example passed `~sw`
too), and `Monitor.Process.start` takes `~sw` (the example missed it).
Wrapped in `let run () =` so the spawned `echo` doesn't actually run
at mdx test time, with the parameter labels matching the real
backend signature.

+14 -9
+4
ocaml-monitor/lib/dune
··· 2 2 (name monitor) 3 3 (public_name monitor) 4 4 (libraries eio fmt logs runc)) 5 + 6 + (mdx 7 + (files monitor.mli) 8 + (libraries monitor fmt eio eio.core eio.unix eio_main))
+10 -9
ocaml-monitor/lib/monitor.mli
··· 20 20 {2 Example} 21 21 22 22 {[ 23 - Eio_main.run @@ fun env -> 24 - Eio.Switch.run @@ fun sw -> 25 - let mon = Monitor.Process.create ~sw ~env () in 26 - let config = Monitor.Process_config.v "echo" [ "hello" ] in 27 - match Monitor.Process.start mon config with 28 - | Ok handle -> 29 - let status = Monitor.Process.wait mon handle in 30 - Fmt.pr "Process %a@." Monitor.pp_status status 31 - | Error msg -> Fmt.epr "Failed: %s@." msg 23 + let run () = 24 + Eio_main.run @@ fun env -> 25 + Eio.Switch.run @@ fun sw -> 26 + let mon = Monitor.Process.create ~env () in 27 + let config = Monitor.Process_config.v "echo" [ "hello" ] in 28 + match Monitor.Process.start ~sw mon config with 29 + | Ok handle -> 30 + let status = Monitor.Process.wait mon handle in 31 + Fmt.pr "Process %a@." Monitor.pp_status status 32 + | Error msg -> Fmt.epr "Failed: %s@." msg 32 33 ]} *) 33 34 34 35 (** {1 Core Types} *)