My own corner of monopam
2
fork

Configure Feed

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

osrelease: defer README example via let detect ()

The block ran at top level so mdx executed [Osrelease.OS.v ()] /
[Distro.v ()] and printed machine-specific output ("Running on macos
/ arm64") which then failed the diff. Wrap as [detect () = ...],
switch [Format.printf]/[Format.eprintf] to [Fmt.pr]/[Fmt.epr], add
[fmt] to the mdx libraries.

+7 -8
+6 -7
osrelease/README.md
··· 26 26 ## Usage 27 27 28 28 ```ocaml 29 - let arch = Osrelease.Arch.v () 30 - let os = Osrelease.OS.v () 31 - let () = 32 - Format.printf "Running on %a / %a\n" 33 - Osrelease.OS.pp os Osrelease.Arch.pp arch; 29 + let detect () = 30 + let arch = Osrelease.Arch.v () in 31 + let os = Osrelease.OS.v () in 32 + Fmt.pr "Running on %a / %a@." Osrelease.OS.pp os Osrelease.Arch.pp arch; 34 33 match Osrelease.Distro.v () with 35 - | Ok distro -> Format.printf "Distro: %a\n" Osrelease.Distro.pp distro 36 - | Error (`Msg msg) -> Format.eprintf "Detection failed: %s\n" msg 34 + | Ok distro -> Fmt.pr "Distro: %a@." Osrelease.Distro.pp distro 35 + | Error (`Msg msg) -> Fmt.epr "Detection failed: %s@." msg 37 36 ``` 38 37 39 38 ## API
+1 -1
osrelease/dune
··· 4 4 5 5 (mdx 6 6 (files README.md) 7 - (libraries osrelease)) 7 + (libraries osrelease fmt))