My own corner of monopam
2
fork

Configure Feed

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

ocaml-xtce: rewrite README example to typecheck

The block referenced [xml_string] free and iterated over a [(name,
param)] tuple, but [Xtce.parameters] is a [parameter list] (each
record has both [name] and [parameter_type_ref] fields). Wrap as
[report xml_string = ...] and switch [Printf.printf] to [Fmt.pr]
with [fmt] in the mdx libs.

+5 -6
+4 -5
ocaml-xtce/README.md
··· 35 35 ## Usage 36 36 37 37 ```ocaml 38 - let xtce = Xtce.of_string xml_string 39 - let () = 38 + let report xml_string = 39 + let xtce = Xtce.of_string xml_string in 40 40 List.iter 41 - (fun (name, param) -> 42 - Printf.printf "Parameter: %s (type: %s)\n" 43 - name param.Xtce.parameter_type_ref) 41 + (fun (param : Xtce.parameter) -> 42 + Fmt.pr "Parameter: %s (type: %s)@." param.name param.parameter_type_ref) 44 43 xtce.Xtce.parameters 45 44 ``` 46 45
+1 -1
ocaml-xtce/dune
··· 4 4 5 5 (mdx 6 6 (files README.md) 7 - (libraries xtce)) 7 + (libraries xtce fmt))