package ortac-core
Ortac (OCaml Runtime Assertion Checking) core tool and library based on Gospel
Install
Dune Dependency
Authors
Maintainers
Sources
0.2.0.tar.gz
md5=15d9aa0fb63a79a5444b35970910c5c4
sha512=3a9162a91c4556553d3105de446e59247360ca2f0bd984124fac330854410d336aed7af252ae73ab7148f8b8f389601cc46e5b783e3bba9a7390df9009e5e10a
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 38 39 40 41 42 43 44 45 46 47
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 include_ = Arg.( value & opt (some string) None & info [ "i"; "include" ] ~docv:"MODULE" ~doc:"Include MODULE in the generated code.") 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 quiet = Arg.(value & flag & info [ "q"; "quiet" ] ~doc:"Don't print any warnings.") 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)"
>