package ortac-core
Ortac (OCaml Runtime Assertion Checking) core tool and library based on Gospel
Install
Dune Dependency
Authors
Maintainers
Sources
0.1.0.tar.gz
md5=665760e43919a9da2b33bb896033b011
sha512=f1f45cd3534ca040eb7e0f0f86c6c905a972d5ff7918946f1a8f04fa7c9947def46b3ede68fa0c2297706832a807389c2964f9bfd8d40bcd06acdf5e3004d57f
doc/src/ortac-core.register/registration.ml.html
Source file registration.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
type plugins = unit Cmdliner.Cmd.t Queue.t let plugins = Queue.create () let register cmd = Queue.add cmd plugins let fold = Queue.fold let get_channel = function None -> stdout | Some path -> open_out path let get_out_formatter s = get_channel s |> Format.formatter_of_out_channel open Cmdliner let setup_log = let init style_renderer = Fmt_tty.setup_std_outputs ?style_renderer () in Term.(const init $ Fmt_cli.style_renderer ()) let output_file = let parse s = match Sys.is_directory s with | true -> Error (`Msg (Fmt.str "Error: `%s' is a directory" s)) | false | (exception Sys_error _) -> Ok (Some s) in Arg.( value & opt (conv ~docv:"OUTPUT" (parse, Fmt.(option string))) None & info [ "o"; "output" ] ~absent:"stdout" ~docv:"OUTPUT" ~doc: "Print the generated code in OUTPUT. Overwrite the file if it exists.") let ocaml_file = let parse s = match Sys.file_exists s with | true -> if Sys.is_directory s || Filename.extension s <> ".mli" then `Error (Fmt.str "Error: `%s' is not an OCaml interface file" s) else `Ok s | false -> `Error (Fmt.str "Error: `%s' not found" s) in Arg.(required & pos 0 (some (parse, Fmt.string)) None & info [] ~docv:"FILE")
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>