diff --git a/.ocamlformat b/.ocamlformat index ca9ad2a62..4eae7930d 100644 --- a/.ocamlformat +++ b/.ocamlformat @@ -2,3 +2,4 @@ version = 0.19.0 profile = conventional break-infix = fit-or-vertical parse-docstrings = true +module-item-spacing = compact diff --git a/lib/functoria/DSL.ml b/lib/functoria/DSL.ml index 19d693a7a..00fd90a1e 100644 --- a/lib/functoria/DSL.ml +++ b/lib/functoria/DSL.ml @@ -17,47 +17,27 @@ *) type 'a key = 'a Key.key - type 'a value = 'a Key.value - type abstract_key = Key.t - type package = Package.t - type scope = Package.scope - type 'a typ = 'a Type.t - type 'a impl = 'a Impl.t - type abstract_impl = Impl.abstract - type 'a device = ('a, Impl.abstract) Device.t - type context = Key.context - type job = Job.t - type info = Info.t let package = Package.v - let ( @-> ) = Type.( @-> ) - let typ = Type.v - let ( $ ) = Impl.( $ ) - let of_device = Impl.of_device - let key = Key.v - let dep = Impl.abstract - let abstract = dep - let if_impl = Impl.if_ - let match_impl = Impl.match_ let impl ?packages ?packages_v ?install ?install_v ?keys ?extra_deps ?connect diff --git a/lib/functoria/action.ml b/lib/functoria/action.ml index edece336a..64259add0 100644 --- a/lib/functoria/action.ml +++ b/lib/functoria/action.ml @@ -20,11 +20,9 @@ let src = Logs.Src.create "functoria.action" ~doc:"functoria library" module Log = (val Logs.src_log src : Logs.LOG) - open Astring type 'a or_err = ('a, Rresult.R.msg) result - type tmp_name_pat = Bos.OS.File.tmp_name_pat type 'a with_output = { @@ -36,9 +34,7 @@ type 'a with_output = { } type channel = [ `Null | `Fmt of Format.formatter ] - type cmd = { cmd : Bos.Cmd.t; err : channel; out : channel; trim : bool } - type ls = { root : Fpath.t; filter : Fpath.t -> bool } type _ command = @@ -67,9 +63,7 @@ and _ t = | Run : 'r command * ('r -> 'a t) -> 'a t let ok x = Done x - let error e = Fail e - let errorf fmt = Fmt.kstr error fmt let rec bind ~f = function @@ -80,33 +74,19 @@ let rec bind ~f = function Run (c, k2) let map ~f x = bind x ~f:(fun y -> ok (f y)) - let rec seq = function [] -> ok () | h :: t -> bind ~f:(fun () -> seq t) h - let wrap x = Run (x, ok) - let ( ! ) = Fpath.normalize - let rm path = wrap @@ Rm !path - let rmdir path = wrap @@ Rmdir !path - let mkdir path = wrap @@ Mkdir !path - let ls path filter = wrap @@ Ls { root = !path; filter } - let with_dir path f = wrap @@ With_dir (!path, f) - let pwd () = wrap @@ Pwd - let is_file path = wrap @@ Is_file !path - let is_dir path = wrap @@ Is_dir !path - let size_of path = wrap @@ Size_of !path - let set_var c v = wrap @@ Set_var (c, v) - let get_var c = wrap @@ Get_var c let run_cmd ?(err = `Fmt Fmt.stderr) ?(out = `Fmt Fmt.stdout) cmd = @@ -116,11 +96,8 @@ let run_cmd_out ?(err = `Fmt Fmt.stderr) cmd = wrap @@ Run_cmd_out { cmd; out = `Null; err; trim = true } let run_cmd_cli cmd = wrap @@ Run_cmd_cli cmd - let write_file path contents = wrap @@ Write_file (!path, contents) - let read_file path = wrap @@ Read_file !path - let tmp_file ?mode pat = wrap @@ Tmp_file (mode, pat) let with_output ?mode ?(append = false) ~path ~purpose contents = @@ -247,15 +224,10 @@ module Env : sig type t val eq : t -> t -> bool - val pp : t Fmt.t - val diff_files : old:t -> t -> Fpath.Set.t - val pwd : t -> Fpath.t - val chdir : t -> Fpath.t -> t - val ls : t -> Fpath.t -> Fpath.t list option val v : @@ -267,27 +239,16 @@ module Env : sig t val exec : t -> Bos.Cmd.t -> (string * string) option - val is_file : t -> Fpath.t -> bool - val is_dir : t -> Fpath.t -> bool - val mkdir : t -> Fpath.t -> (t * bool) option - val rm : t -> Fpath.t -> (t * bool) option - val rmdir : t -> Fpath.t -> t - val size_of : t -> Fpath.t -> int option - val write : t -> Fpath.t -> string -> t - val read : t -> Fpath.t -> string option - val tmp_file : t -> tmp_name_pat -> Fpath.t - val set_var : t -> string -> string option -> t - val get_var : t -> string -> string option end = struct type t = { @@ -354,7 +315,6 @@ end = struct ] let pwd t = t.pwd - let exec t cmd = t.exec cmd let mk_path t path = @@ -471,7 +431,6 @@ let env = Env.v type 'a domain = { result : 'a or_err; env : Env.t; logs : string list } let pp_or_err pp_a = Rresult.R.pp ~error:Rresult.R.pp_msg ~ok:pp_a - let eq_or_err eq_a = Rresult.R.equal ~error:( = ) ~ok:eq_a let pp_domain pp_a = @@ -667,7 +626,6 @@ let generated_files ?(env = env ~exec:(fun _ -> None) ()) t = module Infix = struct let ( >>= ) x f = bind ~f x - let ( >|= ) x f = map ~f x end @@ -675,7 +633,6 @@ module Syntax = struct open Infix let ( let* ) = ( >>= ) - let ( let+ ) = ( >|= ) end diff --git a/lib/functoria/action.mli b/lib/functoria/action.mli index 69f7e11e6..f7c6d2e2a 100644 --- a/lib/functoria/action.mli +++ b/lib/functoria/action.mli @@ -44,19 +44,16 @@ val seq : unit t list -> unit t module List : sig val iter : f:('a -> unit t) -> 'a list -> unit t - val map : f:('a -> 'b t) -> 'a list -> 'b list t end module Infix : sig val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t - val ( >|= ) : 'a t -> ('a -> 'b) -> 'b t end module Syntax : sig val ( let* ) : 'a t -> ('a -> 'b t) -> 'b t - val ( let+ ) : 'a t -> ('a -> 'b) -> 'b t end diff --git a/lib/functoria/cli.ml b/lib/functoria/cli.ml index dc819c846..54cb53f64 100644 --- a/lib/functoria/cli.ml +++ b/lib/functoria/cli.ml @@ -24,11 +24,8 @@ let setup_log style_renderer level = open Cmdliner let common_section = "COMMON OPTIONS" - let configuration_section = "CONFIGURE OPTIONS" - let query_section = "QUERY OPTIONS" - let description_section = "DESCRIBE OPTIONS" type query_kind = @@ -197,9 +194,7 @@ type 'a configure_args = { } type 'a build_args = 'a args - type 'a clean_args = 'a args - type 'a help_args = 'a args type 'a describe_args = { @@ -247,9 +242,7 @@ let pp_configure pp_a = ] let pp_build = pp_args - let pp_clean = pp_args - let pp_help = pp_args let pp_query_kind ppf (q : query_kind) = diff --git a/lib/functoria/context.ml b/lib/functoria/context.ml index 47499e7ef..547dd6d67 100644 --- a/lib/functoria/context.ml +++ b/lib/functoria/context.ml @@ -34,9 +34,7 @@ module Map = Map.Make (String) type t = exn Map.t let empty = Map.empty - let add k v (t : t) : t = Map.add k.name (k.put v) t - let mem k (t : t) = Map.mem k.name t let find k (t : t) = diff --git a/lib/functoria/context_cache.ml b/lib/functoria/context_cache.ml index e682fd221..236d54c80 100644 --- a/lib/functoria/context_cache.ml +++ b/lib/functoria/context_cache.ml @@ -26,7 +26,6 @@ module Log = (val Logs.src_log src : Logs.LOG) type t = string array let empty = [| "" |] - let is_empty t = t = empty let write file argv = diff --git a/lib/functoria/device.ml b/lib/functoria/device.ml index bd5b1eb29..a1b9eddad 100644 --- a/lib/functoria/device.ml +++ b/lib/functoria/device.ml @@ -20,13 +20,9 @@ open Action.Syntax open Astring type abstract_key = Key.t - type package = Package.t - type info = Info.t - type 'a value = 'a Key.value - type 'a code = string type ('a, 'impl) t = { @@ -60,16 +56,13 @@ let pp : type a b. b Fmt.t -> (a, b) t Fmt.t = record fields ppf t let equal x y = Typeid.equal x.id y.id - let witness x y = Typeid.witness x.id y.id - let hash x = Typeid.id x.id let default_connect _ _ l = Printf.sprintf "return (%s)" (String.concat ~sep:", " l) let niet _ = Action.ok () - let nil _ = [] let merge empty union a b = @@ -80,7 +73,6 @@ let merge empty union a b = | Some a, Some b -> Key.(pure union $ pure a $ b) let merge_packages = merge [] List.append - let merge_install = merge Install.empty Install.union let v ?packages ?packages_v ?install ?install_v ?(keys = []) ?(extra_deps = []) @@ -107,17 +99,11 @@ let v ?packages ?packages_v ?install ?install_v ?(keys = []) ?(extra_deps = []) } let id t = Typeid.id t.id - let module_name t = t.module_name - let module_type t = t.module_type - let packages t = t.packages - let install t = t.install - let connect t = t.connect - let configure t = t.configure let files t i = @@ -127,16 +113,13 @@ let files t i = | Some files -> Fpath.Set.(union gen (of_list (files i))) let dune t = t.dune - let keys t = t.keys - let extra_deps t = t.extra_deps let start impl_name args = Fmt.str "@[%s.start@ %a@]" impl_name Fmt.(list ~sep:sp string) args let uniq t = Fpath.Set.(elements (of_list t)) - let exec_hook i = function None -> Action.ok () | Some h -> h i let extend ?packages ?packages_v ?dune ?pre_configure ?post_configure ?files t = @@ -180,7 +163,6 @@ module Graph = struct type t = dtree let hash (D t) = t.id - let equal (D t1) (D t2) = Int.equal t1.id t2.id end) diff --git a/lib/functoria/dune.ml b/lib/functoria/dune.ml index e55146f2a..95259cd57 100644 --- a/lib/functoria/dune.ml +++ b/lib/functoria/dune.ml @@ -19,11 +19,9 @@ open Astring type stanza = string option - type t = string list let stanza v = Some (String.trim v) - let stanzaf fmt = Fmt.kstr stanza fmt let v x : t = @@ -32,15 +30,12 @@ let v x : t = [] (List.rev x) let pp_list pp = Fmt.(list ~sep:(any "\n\n") pp) - let pp ppf (t : t) = Fmt.pf ppf "%a" (pp_list Fmt.string) t - let to_string t = Fmt.to_to_string pp t ^ "\n" let headers ~name ~version = let module M = Filegen.Make (struct let name = name - let version = version end) in M.headers `Sexp @@ -115,5 +110,4 @@ let base ~packages ~name ~version ~config_ml_file = disable_duniverse :: dune_base let base_project = [ stanza "(lang dune 2.7)" ] - let base_workspace = v [ stanza "(lang dune 2.0)\n(context default)" ] diff --git a/lib/functoria/dune.mli b/lib/functoria/dune.mli index 840851650..440e1b4ed 100644 --- a/lib/functoria/dune.mli +++ b/lib/functoria/dune.mli @@ -21,17 +21,13 @@ type stanza val stanza : string -> stanza - val stanzaf : ('a, Format.formatter, unit, stanza) format4 -> 'a type t val v : stanza list -> t - val pp : t Fmt.t - val to_string : t -> string - val compact_list : ?indent:int -> string -> string list Fmt.t val base : diff --git a/lib/functoria/engine.ml b/lib/functoria/engine.ml index b5d408a02..cb517f306 100644 --- a/lib/functoria/engine.ml +++ b/lib/functoria/engine.ml @@ -40,7 +40,6 @@ module Packages = struct type t = Package.t String.Map.t Key.value let union x y = Key.(pure (String.Map.union (fun _ -> Package.merge)) $ x $ y) - let empty = Key.pure String.Map.empty end @@ -62,7 +61,6 @@ module Installs = struct type t = Install.t Key.value let union x y = Key.(pure Install.union $ x $ y) - let empty = Key.pure Install.empty end @@ -82,7 +80,6 @@ module Dune = struct type t = Dune.stanza list let union = ( @ ) - let empty = [] end diff --git a/lib/functoria/filegen.ml b/lib/functoria/filegen.ml index e19f8d0ae..0dd56b448 100644 --- a/lib/functoria/filegen.ml +++ b/lib/functoria/filegen.ml @@ -21,7 +21,6 @@ open Action.Syntax module type PROJECT = sig val name : string - val version : string end diff --git a/lib/functoria/filegen.mli b/lib/functoria/filegen.mli index e1c4e2e7f..23385d365 100644 --- a/lib/functoria/filegen.mli +++ b/lib/functoria/filegen.mli @@ -20,14 +20,11 @@ module type PROJECT = sig val name : string - val version : string end module Make (P : PROJECT) : sig val write : Fpath.t -> string -> unit Action.t - val headers : [ `OCaml | `Sexp | `Make | `Opam ] -> string - val rm : Fpath.t -> unit Action.t end diff --git a/lib/functoria/functoria.ml b/lib/functoria/functoria.ml index 6e8f0f66b..f57f869b3 100644 --- a/lib/functoria/functoria.ml +++ b/lib/functoria/functoria.ml @@ -53,9 +53,7 @@ module type KEY = include DSL let job = Job.t - let noop = Job.noop - let info = Info.t let keys ?runtime_package ?runtime_modname x = @@ -64,7 +62,6 @@ let keys ?runtime_package ?runtime_modname x = type argv = Argv.t let sys_argv = Argv.sys_argv - let argv = Argv.argv (* Info device *) diff --git a/lib/functoria/impl.ml b/lib/functoria/impl.ml index b40e3f239..caa5d1866 100644 --- a/lib/functoria/impl.ml +++ b/lib/functoria/impl.ml @@ -45,7 +45,6 @@ let abstract t = Abstract t (* Devices *) let mk_dev ~args ~deps dev = Dev { dev; args; deps } - let of_device dev = mk_dev ~args:Nil ~deps:(Device.extra_deps dev) dev let v ?packages ?packages_v ?keys ?extra_deps ?connect ?dune ?configure ?files @@ -188,7 +187,6 @@ module Tbl = Hashtbl.Make (struct type t = abstract let hash = hash_abstract - let equal = equal_abstract end) @@ -196,15 +194,12 @@ module Hashcons : sig type tbl val create : unit -> tbl - val add : tbl -> 'a t -> 'a t -> unit - val get : tbl -> 'a t -> 'a t option end = struct type tbl = abstract Tbl.t let create () = Tbl.create 50 - let add tbl a b = Tbl.add tbl (abstract a) (abstract b) let get (type a) tbl (oldv : a t) : a t option = diff --git a/lib/functoria/info.ml b/lib/functoria/info.ml index 6aabef2e9..9b63c8181 100644 --- a/lib/functoria/info.ml +++ b/lib/functoria/info.ml @@ -40,7 +40,6 @@ let opam scope t = match scope with `Monorepo -> t.opam_monorepo | `Switch -> t.opam_switch let output t = t.output - let with_output t output = { t with output = Some output } let libraries ps = @@ -52,7 +51,6 @@ let libraries ps = (List.fold_left String.Set.union String.Set.empty (List.map libs ps)) let packages t = List.map snd (String.Map.bindings t.packages) - let libraries t = libraries (packages t) let pins packages = @@ -64,7 +62,6 @@ let pins packages = [] packages let keys t = Key.Set.elements t.keys - let context t = t.context let v ~packages ~keys ~context ~build_cmd ~src name = diff --git a/lib/functoria/install.ml b/lib/functoria/install.ml index faeee9607..7b18616c2 100644 --- a/lib/functoria/install.ml +++ b/lib/functoria/install.ml @@ -19,7 +19,6 @@ type t = { bin : (Fpath.t * Fpath.t) list; etc : Fpath.t list } let v ?(bin = []) ?(etc = []) () = { bin; etc } - let empty = v () let dump ppf t = @@ -80,7 +79,5 @@ let dune ~context_name t = Dune.v (bin_rules @ etc_rules) let union_etc x y = Fpath.Set.(elements (union (of_list x) (of_list y))) - let union_bin x y = x @ y - let union x y = { bin = union_bin x.bin y.bin; etc = union_etc x.etc y.etc } diff --git a/lib/functoria/job.ml b/lib/functoria/job.ml index 9c9bc6708..8a5e71bca 100644 --- a/lib/functoria/job.ml +++ b/lib/functoria/job.ml @@ -19,7 +19,6 @@ let src = Logs.Src.create "functoria" ~doc:"functoria library" module Log = (val Logs.src_log src : Logs.LOG) - open Astring type t = JOB diff --git a/lib/functoria/key.ml b/lib/functoria/key.ml index cc7d0ffff..cb5f0deb8 100644 --- a/lib/functoria/key.ml +++ b/lib/functoria/key.ml @@ -20,9 +20,7 @@ open Misc module Serialize = struct let string fmt s = Format.fprintf fmt "%S" s - let option x = Fmt.(parens @@ Dump.option x) - let list x = Fmt.Dump.list x end @@ -30,7 +28,6 @@ module Arg = struct (** {1 Converters} *) type 'a serialize = Format.formatter -> 'a -> unit - type 'a runtime_conv = string type 'a converter = { @@ -40,11 +37,8 @@ module Arg = struct } let conv ~conv ~serialize ~runtime_conv = { conv; serialize; runtime_conv } - let converter x = x.conv - let serialize x = x.serialize - let runtime_conv x = x.runtime_conv let string = @@ -289,9 +283,7 @@ module Set = struct else add k set let pp_gen = Fmt.iter ~sep:(Fmt.any ",@ ") iter - let pp_elt fmt (Any k) = Fmt.string fmt k.name - let pp = pp_gen pp_elt end @@ -299,11 +291,8 @@ module Alias = struct type 'a t = { a_setters : 'a setter list; a_arg : 'a Arg.t } let setters t = t.a_setters - let arg t = t.a_arg - let create a_arg = { a_setters = []; a_arg } - let flag doc = create (Arg.flag ~stage:`Configure doc) (* let opt conv d i = create (Arg.opt ~stage:`Configure conv d i) *) @@ -315,20 +304,14 @@ module Alias = struct | Some v -> if Context.mem k.key map then map else Context.add k.key v map let apply v l map = List.fold_left (apply_one v) map l - let keys l = Set.of_list @@ List.map (fun (Setter (k, _)) -> Any k) l end let v x = Any x - let abstract = v - let arg k = k.arg - let aliases (Any k) = Alias.keys k.setters - let name (Any k) = k.name - let stage (Any k) = Arg.stage k.arg let is_runtime k = @@ -348,15 +331,10 @@ let filter_stage stage s = type context = Context.t let empty_context = Context.empty - let merge_context = Context.merge - let add_to_context t = Context.add t.key - let find (type a) ctx (t : a key) : a option = Context.find t.key ctx - let get ctx t = match find ctx t with Some x -> x | None -> Arg.default t.arg - let mem_u ctx t = Context.mem t.key ctx (* {2 Values} *) @@ -364,20 +342,15 @@ let mem_u ctx t = Context.mem t.key ctx type +'a value = { deps : Set.t; v : context -> 'a } let eval p v = v.v p - let pure x = { deps = Set.empty; v = (fun _ -> x) } let app f x = { deps = Set.union f.deps x.deps; v = (fun p -> (eval p f) (eval p x)) } let map f x = app (pure f) x - let pipe x f = map f x - let if_ c t e = pipe c @@ fun b -> if b then t else e - let match_ v f = map f v - let ( $ ) = app let value k = @@ -385,21 +358,15 @@ let value k = { deps = Set.singleton (Any k); v } let of_deps deps = { (pure ()) with deps } - let deps k = k.deps - let mem p v = Set.for_all (fun (Any x) -> mem_u p x) v.deps - let peek p v = if mem p v then Some (eval p v) else None - let default v = eval Context.empty v (* {2 Pretty printing} *) let dump_context = Context.dump - let pp = Set.pp_elt - let pp_deps fmt v = Set.pp fmt v.deps let pps p = @@ -484,11 +451,8 @@ let context ?(stage = `Both) ~with_required l = (* {2 Code emission} *) let module_name = "Key_gen" - let ocaml_name k = Name.ocamlify (name k) - let serialize_call fmt k = Fmt.pf fmt "(%s.%s ())" module_name (ocaml_name k) - let serialize ctx ppf (Any k) = Arg.serialize (get ctx k) ppf (arg k) let serialize_rw ctx fmt t = diff --git a/lib/functoria/key.mli b/lib/functoria/key.mli index 7e4eb944d..fd5810615 100644 --- a/lib/functoria/key.mli +++ b/lib/functoria/key.mli @@ -256,7 +256,6 @@ val dump_context : context Fmt.t (** [dump_context] dumps the contents of a context. *) val empty_context : context - val merge_context : default:context -> context -> context val add_to_context : 'a key -> 'a -> context -> context diff --git a/lib/functoria/lib.ml b/lib/functoria/lib.ml index e6d9950b6..9a3452559 100644 --- a/lib/functoria/lib.ml +++ b/lib/functoria/lib.ml @@ -74,27 +74,18 @@ module Config = struct Key.(pure mk $ packages $ of_deps (Set.of_list keys)) let keys t = t.keys - let pp_dot = Impl.pp_dot end module type S = sig val prelude : string - val packages : Package.t list - val name : string - val version : string - val create : job impl list -> job impl - val name_of_target : Info.t -> string - val dune_project : Dune.stanza list - val dune_workspace : (?build_dir:Fpath.t -> info -> Dune.t) option - val context_name : Info.t -> string end @@ -102,11 +93,8 @@ module Make (P : S) = struct module Filegen = Filegen.Make (P) let default_init = [ Job.keys Argv.sys_argv ] - let build_dir args = Fpath.parent args.Cli.config_file - let mirage_dir args = Fpath.(build_dir args / P.name) - let artifacts_dir args = Fpath.(build_dir args / "dist") let exit_err args = function @@ -354,7 +342,6 @@ module Make (P : S) = struct Action.with_dir (artifacts_dir args) (generate_dune `Dist args) let ok () = Action.ok () - let exit () = Action.error "" let with_output args = diff --git a/lib/functoria/lib.mli b/lib/functoria/lib.mli index eff885c56..2e86c60d2 100644 --- a/lib/functoria/lib.mli +++ b/lib/functoria/lib.mli @@ -53,9 +53,7 @@ module type S = sig key defined in [i]. *) val dune_project : Dune.stanza list - val dune_workspace : (?build_dir:Fpath.t -> info -> Dune.t) option - val context_name : Info.t -> string end diff --git a/lib/functoria/misc.ml b/lib/functoria/misc.ml index 02f3a311b..38ae16f52 100644 --- a/lib/functoria/misc.ml +++ b/lib/functoria/misc.ml @@ -27,7 +27,6 @@ module type Monoid = sig type t val empty : t - val union : t -> t -> t end diff --git a/lib/functoria/misc.mli b/lib/functoria/misc.mli index ece1913b9..62367d78c 100644 --- a/lib/functoria/misc.mli +++ b/lib/functoria/misc.mli @@ -28,7 +28,6 @@ module type Monoid = sig type t val empty : t - val union : t -> t -> t end diff --git a/lib/functoria/opam.mli b/lib/functoria/opam.mli index 77d190a34..631ca92fc 100644 --- a/lib/functoria/opam.mli +++ b/lib/functoria/opam.mli @@ -17,7 +17,6 @@ *) type t - type target = [ `Switch | `Monorepo ] val v : diff --git a/lib/functoria/package.ml b/lib/functoria/package.ml index 69e1e24ff..b868db56e 100644 --- a/lib/functoria/package.ml +++ b/lib/functoria/package.ml @@ -38,15 +38,10 @@ let key t = | `Monorepo -> "monorepo-" ^ t.name let pin t = t.pin - let build_dependency t = t.build - let scope t = t.scope - let libraries t = String.Set.elements t.libs - let min_versions t = String.Set.elements t.min - let max_versions t = String.Set.elements t.max let merge a b = diff --git a/lib/functoria/tool.ml b/lib/functoria/tool.ml index 0b94dea52..2d79deca9 100644 --- a/lib/functoria/tool.ml +++ b/lib/functoria/tool.ml @@ -25,11 +25,8 @@ module Log = (val Logs.src_log src : Logs.LOG) module type S = sig val name : string - val version : string - val packages : package list - val create : job impl list -> job impl end @@ -37,7 +34,6 @@ module Make (P : S) = struct module Filegen = Filegen.Make (P) let build_dir t = Fpath.parent t.Cli.config_file - let context_file t = Context_cache.file ~name:P.name t let add_context_file t argv = @@ -110,7 +106,6 @@ module Make (P : S) = struct run_cmd ?ppf ?err_ppf command let write_context t argv = Context_cache.write (context_file t) argv - let remove_context t = Action.rm (context_file t) (* Generated a project skeleton and try to compile config.exe. *) @@ -220,13 +215,9 @@ module Make (P : S) = struct re_exec_cli args argv let build (t : 'a Cli.build_args) = try_to_re_exec t - let error t = try_to_re_exec t - let query (t : 'a Cli.query_args) = try_to_re_exec t.args - let describe (t : 'a Cli.describe_args) = try_to_re_exec t.args - let help (t : 'a Cli.help_args) = try_to_re_exec t let clean args ?ppf ?err_ppf argv = @@ -238,7 +229,6 @@ module Make (P : S) = struct clean_files args let run args action = action |> action_run args |> exit_err args - let pp_unit _ _ = () let run_with_argv ?help_ppf ?err_ppf argv = diff --git a/lib/functoria/type.ml b/lib/functoria/type.ml index 17dc36805..7bbedd4e5 100644 --- a/lib/functoria/type.ml +++ b/lib/functoria/type.ml @@ -21,7 +21,6 @@ type _ t = | Function : 'a t * 'b t -> ('a -> 'b) t let v x = Type x - let ( @-> ) f x = Function (f, x) let rec pp : type a. a t Fmt.t = diff --git a/lib/functoria/typeid.ml b/lib/functoria/typeid.ml index 47f0f90fa..0afba2664 100644 --- a/lib/functoria/typeid.ml +++ b/lib/functoria/typeid.ml @@ -28,7 +28,6 @@ end module type ID = sig type t - type _ Id.t += Tid : t Id.t val id : int @@ -45,7 +44,6 @@ let gen_id = let gen () (type s) = let module M = struct type t = s - type _ Id.t += Tid : t Id.t let id = gen_id () @@ -59,7 +57,5 @@ let witness : type r s. r t -> s t -> (r, s) witness = match R.Tid with S.Tid -> Eq | _ -> NotEq let equal a b = to_bool @@ witness a b - let pp (type a) ppf ((module M) : a t) = Fmt.int ppf M.id - let id (type a) ((module M) : a t) = M.id diff --git a/lib/mirage/impl/mirage_impl_argv.mli b/lib/mirage/impl/mirage_impl_argv.mli index 558e0ee87..0dce6a225 100644 --- a/lib/mirage/impl/mirage_impl_argv.mli +++ b/lib/mirage/impl/mirage_impl_argv.mli @@ -1,3 +1,2 @@ val default_argv : Functoria.argv Functoria.impl - val no_argv : Functoria.argv Functoria.impl diff --git a/lib/mirage/impl/mirage_impl_block.ml b/lib/mirage/impl/mirage_impl_block.ml index ccbdef9a6..a4d5a772a 100644 --- a/lib/mirage/impl/mirage_impl_block.ml +++ b/lib/mirage/impl/mirage_impl_block.ml @@ -132,5 +132,4 @@ let archive_conf = impl ~packages ~connect "Tar_mirage.Make_KV_RO" (block @-> Mirage_impl_kv.ro) let archive block = archive_conf $ block - let archive_of_files ?(dir = ".") () = archive @@ tar_block dir diff --git a/lib/mirage/impl/mirage_impl_block.mli b/lib/mirage/impl/mirage_impl_block.mli index fd95631c6..62c045dbe 100644 --- a/lib/mirage/impl/mirage_impl_block.mli +++ b/lib/mirage/impl/mirage_impl_block.mli @@ -9,15 +9,10 @@ val generic_block : block Functoria.impl val archive_of_files : ?dir:string -> unit -> Mirage_impl_kv.ro Functoria.impl - val archive : block Functoria.impl -> Mirage_impl_kv.ro Functoria.impl - val ramdisk : string -> block Functoria.impl - val block_of_xenstore_id : string -> block Functoria.impl - val block_of_file : string -> block Functoria.impl - val block_conf : string -> block Functoria.device type block_t = { filename : string; number : int } diff --git a/lib/mirage/impl/mirage_impl_conduit.ml b/lib/mirage/impl/mirage_impl_conduit.ml index 90e2b3be4..7cb27a5d9 100644 --- a/lib/mirage/impl/mirage_impl_conduit.ml +++ b/lib/mirage/impl/mirage_impl_conduit.ml @@ -6,7 +6,6 @@ open Mirage_impl_random type conduit = Conduit let conduit = Type.v Conduit - let pkg = package ~min:"4.0.0" ~max:"5.0.0" "conduit-mirage" let tcp = diff --git a/lib/mirage/impl/mirage_impl_conduit.mli b/lib/mirage/impl/mirage_impl_conduit.mli index eaf676422..db9f10516 100644 --- a/lib/mirage/impl/mirage_impl_conduit.mli +++ b/lib/mirage/impl/mirage_impl_conduit.mli @@ -3,7 +3,6 @@ open Functoria type conduit val pkg : package - val conduit : conduit typ val conduit_direct : diff --git a/lib/mirage/impl/mirage_impl_console.ml b/lib/mirage/impl/mirage_impl_console.ml index 719931d70..38e22df40 100644 --- a/lib/mirage/impl/mirage_impl_console.ml +++ b/lib/mirage/impl/mirage_impl_console.ml @@ -4,7 +4,6 @@ module Key = Mirage_key type console = CONSOLE let console = Type.v CONSOLE - let connect str _ m _ = Fmt.str "%s.connect %S" m str let console_unix str = diff --git a/lib/mirage/impl/mirage_impl_console.mli b/lib/mirage/impl/mirage_impl_console.mli index 3df3063d9..07de5ccf5 100644 --- a/lib/mirage/impl/mirage_impl_console.mli +++ b/lib/mirage/impl/mirage_impl_console.mli @@ -1,7 +1,5 @@ type console val console : console Functoria.typ - val default_console : console Functoria.impl - val custom_console : string -> console Functoria.impl diff --git a/lib/mirage/impl/mirage_impl_ethernet.mli b/lib/mirage/impl/mirage_impl_ethernet.mli index 0c698d5b5..044704b18 100644 --- a/lib/mirage/impl/mirage_impl_ethernet.mli +++ b/lib/mirage/impl/mirage_impl_ethernet.mli @@ -1,5 +1,4 @@ type ethernet val ethernet : ethernet Functoria.typ - val etif : Mirage_impl_network.network Functoria.impl -> ethernet Functoria.impl diff --git a/lib/mirage/impl/mirage_impl_fs.ml b/lib/mirage/impl/mirage_impl_fs.ml index d275bb503..82d6c7744 100644 --- a/lib/mirage/impl/mirage_impl_fs.ml +++ b/lib/mirage/impl/mirage_impl_fs.ml @@ -6,7 +6,6 @@ module Key = Mirage_key type t = FS let typ = Type.v FS - let fat_pkg = package ~min:"0.14.0" ~max:"0.15.0" "fat-filesystem" let connect err _ modname l = diff --git a/lib/mirage/impl/mirage_impl_fs.mli b/lib/mirage/impl/mirage_impl_fs.mli index 8836bef33..b0883ade7 100644 --- a/lib/mirage/impl/mirage_impl_fs.mli +++ b/lib/mirage/impl/mirage_impl_fs.mli @@ -1,11 +1,8 @@ type t val typ : t Functoria.typ - val fat : Mirage_impl_block.block Functoria.impl -> t Functoria.impl - val fat_of_files : ?dir:string -> ?regexp:string -> unit -> t Functoria.impl - val kv_ro_of_fs : t Functoria.impl -> Mirage_impl_kv.ro Functoria.impl val generic_kv_ro : diff --git a/lib/mirage/impl/mirage_impl_http.mli b/lib/mirage/impl/mirage_impl_http.mli index 3aa5b07a6..72b111a52 100644 --- a/lib/mirage/impl/mirage_impl_http.mli +++ b/lib/mirage/impl/mirage_impl_http.mli @@ -3,9 +3,7 @@ open Functoria type http val http : http typ - val cohttp_server : Mirage_impl_conduit.conduit impl -> http impl - val httpaf_server : Mirage_impl_conduit.conduit impl -> http impl type http_client diff --git a/lib/mirage/impl/mirage_impl_icmp.ml b/lib/mirage/impl/mirage_impl_icmp.ml index cbae3b3db..0a1f03b1b 100644 --- a/lib/mirage/impl/mirage_impl_icmp.ml +++ b/lib/mirage/impl/mirage_impl_icmp.ml @@ -3,11 +3,9 @@ open Mirage_impl_ip open Mirage_impl_misc type 'a icmp = ICMP - type icmpv4 = v4 icmp let icmp = Type.v ICMP - let icmpv4 : icmpv4 typ = icmp let icmpv4_direct () = diff --git a/lib/mirage/impl/mirage_impl_icmp.mli b/lib/mirage/impl/mirage_impl_icmp.mli index f68c3e6d9..b219ac19f 100644 --- a/lib/mirage/impl/mirage_impl_icmp.mli +++ b/lib/mirage/impl/mirage_impl_icmp.mli @@ -1,5 +1,4 @@ type icmpv4 val icmpv4 : icmpv4 Functoria.typ - val direct_icmpv4 : Mirage_impl_ip.ipv4 Functoria.impl -> icmpv4 Functoria.impl diff --git a/lib/mirage/impl/mirage_impl_ip.ml b/lib/mirage/impl/mirage_impl_ip.ml index 76a4f9f67..9a2d669b2 100644 --- a/lib/mirage/impl/mirage_impl_ip.ml +++ b/lib/mirage/impl/mirage_impl_ip.ml @@ -10,25 +10,16 @@ open Mirage_impl_time module Key = Mirage_key type v4 - type v6 - type v4v6 - type 'a ip = IP - type ipv4 = v4 ip - type ipv6 = v6 ip - type ipv4v6 = v4v6 ip let ip = Type.Type IP - let ipv4 : ipv4 typ = ip - let ipv6 : ipv6 typ = ip - let ipv4v6 : ipv4v6 typ = ip type ipv4_config = { @@ -38,13 +29,9 @@ type ipv4_config = { (** Types for IPv4 manual configuration. *) let opt_opt_key s = Fmt.(option @@ (any ("?" ^^ s ^^ ":") ++ pp_key)) - let opt_key s = Fmt.(option @@ (any ("~" ^^ s ^^ ":") ++ pp_key)) - let opt_map f = function Some x -> Some (f x) | None -> None - let ( @? ) x l = match x with Some s -> s :: l | None -> l - let ( @?? ) x y = opt_map Key.v x @? y (* convenience function for linking tcpip.unix for checksums *) diff --git a/lib/mirage/impl/mirage_impl_ip.mli b/lib/mirage/impl/mirage_impl_ip.mli index 692a557ce..461adebb3 100644 --- a/lib/mirage/impl/mirage_impl_ip.mli +++ b/lib/mirage/impl/mirage_impl_ip.mli @@ -7,25 +7,16 @@ open Mirage_impl_qubesdb open Mirage_impl_random type v4 - type v6 - type v4v6 - type 'a ip - type ipv4 = v4 ip - type ipv6 = v6 ip - type ipv4v6 = v4v6 ip val ip : 'a ip Functoria.typ - val ipv4 : ipv4 Functoria.typ - val ipv6 : ipv6 Functoria.typ - val ipv4v6 : ipv4v6 Functoria.typ type ipv4_config = { diff --git a/lib/mirage/impl/mirage_impl_kv.mli b/lib/mirage/impl/mirage_impl_kv.mli index 3d77e4b65..1856994b5 100644 --- a/lib/mirage/impl/mirage_impl_kv.mli +++ b/lib/mirage/impl/mirage_impl_kv.mli @@ -1,15 +1,12 @@ type ro val ro : ro Functoria.typ - val direct_kv_ro : string -> ro Functoria.impl - val crunch : string -> ro Functoria.impl type rw val rw : rw Functoria.typ - val direct_kv_rw : string -> rw Functoria.impl val mem_kv_rw : diff --git a/lib/mirage/impl/mirage_impl_mclock.mli b/lib/mirage/impl/mirage_impl_mclock.mli index 103dfbe51..25d11e03d 100644 --- a/lib/mirage/impl/mirage_impl_mclock.mli +++ b/lib/mirage/impl/mirage_impl_mclock.mli @@ -1,5 +1,4 @@ type mclock val mclock : mclock Functoria.typ - val default_monotonic_clock : mclock Functoria.impl diff --git a/lib/mirage/impl/mirage_impl_misc.mli b/lib/mirage/impl/mirage_impl_misc.mli index 1de5371f5..fd2326a24 100644 --- a/lib/mirage/impl/mirage_impl_misc.mli +++ b/lib/mirage/impl/mirage_impl_misc.mli @@ -1,11 +1,8 @@ open Functoria - module Log : Logs.LOG val get_target : Info.t -> Mirage_key.mode - val connect_err : string -> int -> string - val pp_key : Format.formatter -> 'a Key.key -> unit val query_ocamlfind : @@ -16,7 +13,5 @@ val query_ocamlfind : string list Action.t val opam_prefix : string Action.t Lazy.t - val extra_c_artifacts : string -> string list -> string list Action.t - val terminal : unit -> bool diff --git a/lib/mirage/impl/mirage_impl_network.ml b/lib/mirage/impl/mirage_impl_network.ml index 46c6ae73e..23a495df5 100644 --- a/lib/mirage/impl/mirage_impl_network.ml +++ b/lib/mirage/impl/mirage_impl_network.ml @@ -4,7 +4,6 @@ module Key = Mirage_key type network = NETWORK let network = Type.v NETWORK - let all_networks = ref [] let network_conf (intf : string Key.key) = diff --git a/lib/mirage/impl/mirage_impl_network.mli b/lib/mirage/impl/mirage_impl_network.mli index a43d082f8..2d71803cb 100644 --- a/lib/mirage/impl/mirage_impl_network.mli +++ b/lib/mirage/impl/mirage_impl_network.mli @@ -1,9 +1,6 @@ type network val network : network Functoria.typ - val netif : ?group:string -> string -> network Functoria.impl - val default_network : network Functoria.impl - val all_networks : string list ref diff --git a/lib/mirage/impl/mirage_impl_pclock.mli b/lib/mirage/impl/mirage_impl_pclock.mli index 56b30ca49..45630021c 100644 --- a/lib/mirage/impl/mirage_impl_pclock.mli +++ b/lib/mirage/impl/mirage_impl_pclock.mli @@ -1,5 +1,4 @@ type pclock val pclock : pclock Functoria.typ - val default_posix_clock : pclock Functoria.impl diff --git a/lib/mirage/impl/mirage_impl_qubesdb.ml b/lib/mirage/impl/mirage_impl_qubesdb.ml index 53883c75b..2fa4af423 100644 --- a/lib/mirage/impl/mirage_impl_qubesdb.ml +++ b/lib/mirage/impl/mirage_impl_qubesdb.ml @@ -5,7 +5,6 @@ open Mirage_impl_misc type qubesdb = QUBES_DB let qubesdb = Type.v QUBES_DB - let pkg = package ~min:"0.9.0" ~max:"0.10.0" "mirage-qubes" let default_qubesdb = diff --git a/lib/mirage/impl/mirage_impl_qubesdb.mli b/lib/mirage/impl/mirage_impl_qubesdb.mli index 99f161126..af75e6d56 100644 --- a/lib/mirage/impl/mirage_impl_qubesdb.mli +++ b/lib/mirage/impl/mirage_impl_qubesdb.mli @@ -1,7 +1,5 @@ type qubesdb val qubesdb : qubesdb Functoria.typ - val default_qubesdb : qubesdb Functoria.impl - val pkg : Functoria.package diff --git a/lib/mirage/impl/mirage_impl_random.ml b/lib/mirage/impl/mirage_impl_random.ml index a33d20c98..13890070e 100644 --- a/lib/mirage/impl/mirage_impl_random.ml +++ b/lib/mirage/impl/mirage_impl_random.ml @@ -24,5 +24,4 @@ let rng ?(time = default_time) ?(mclock = default_monotonic_clock) () = $ mclock let default_random = rng () - let nocrypto = Functoria.noop diff --git a/lib/mirage/impl/mirage_impl_random.mli b/lib/mirage/impl/mirage_impl_random.mli index 4d77e4ca7..b99ffa300 100644 --- a/lib/mirage/impl/mirage_impl_random.mli +++ b/lib/mirage/impl/mirage_impl_random.mli @@ -5,9 +5,6 @@ open Mirage_impl_mclock type random val random : random typ - val rng : ?time:time impl -> ?mclock:mclock impl -> unit -> random impl - val default_random : random impl - val nocrypto : job impl diff --git a/lib/mirage/impl/mirage_impl_syslog.ml b/lib/mirage/impl/mirage_impl_syslog.ml index 3816eb71f..0057cfa42 100644 --- a/lib/mirage/impl/mirage_impl_syslog.ml +++ b/lib/mirage/impl/mirage_impl_syslog.ml @@ -25,13 +25,9 @@ let default_syslog_config = type syslog = SYSLOG let syslog = Type.v SYSLOG - let opt p s = Fmt.(option @@ (any ("~" ^^ s ^^ ":") ++ p)) - let opt_int = opt Fmt.int - let opt_string = opt (fun pp v -> Format.fprintf pp "%S" v) - let pkg sublibs = [ package ~min:"0.3.0" ~max:"0.4.0" ~sublibs "logs-syslog" ] let syslog_udp_conf config = diff --git a/lib/mirage/impl/mirage_impl_tcp.ml b/lib/mirage/impl/mirage_impl_tcp.ml index 86925d46a..33011e559 100644 --- a/lib/mirage/impl/mirage_impl_tcp.ml +++ b/lib/mirage/impl/mirage_impl_tcp.ml @@ -7,19 +7,13 @@ open Mirage_impl_time module Key = Mirage_key type 'a tcp = TCP - type tcpv4 = v4 tcp - type tcpv6 = v6 tcp - type tcpv4v6 = v4v6 tcp let tcp = Type.Type TCP - let tcpv4 : tcpv4 typ = tcp - let tcpv6 : tcpv6 typ = tcp - let tcpv4v6 : tcpv4v6 typ = tcp (* this needs to be a function due to the value restriction. *) diff --git a/lib/mirage/impl/mirage_impl_tcp.mli b/lib/mirage/impl/mirage_impl_tcp.mli index b028e568b..641faafe7 100644 --- a/lib/mirage/impl/mirage_impl_tcp.mli +++ b/lib/mirage/impl/mirage_impl_tcp.mli @@ -3,15 +3,11 @@ type 'a tcp val tcp : 'a tcp Functoria.typ type tcpv4 = Mirage_impl_ip.v4 tcp - type tcpv6 = Mirage_impl_ip.v6 tcp - type tcpv4v6 = Mirage_impl_ip.v4v6 tcp val tcpv4 : tcpv4 Functoria.typ - val tcpv6 : tcpv6 Functoria.typ - val tcpv4v6 : tcpv4v6 Functoria.typ val direct_tcp : diff --git a/lib/mirage/impl/mirage_impl_time.ml b/lib/mirage/impl/mirage_impl_time.ml index a72dfb072..05c9bb7b8 100644 --- a/lib/mirage/impl/mirage_impl_time.ml +++ b/lib/mirage/impl/mirage_impl_time.ml @@ -3,5 +3,4 @@ open Functoria type time = TIME let time = Type.v TIME - let default_time = impl ~packages:[ package "mirage-time" ] "OS.Time" time diff --git a/lib/mirage/impl/mirage_impl_time.mli b/lib/mirage/impl/mirage_impl_time.mli index 14ebcaf3a..c2f3494fe 100644 --- a/lib/mirage/impl/mirage_impl_time.mli +++ b/lib/mirage/impl/mirage_impl_time.mli @@ -1,5 +1,4 @@ type time val time : time Functoria.typ - val default_time : time Functoria.impl diff --git a/lib/mirage/impl/mirage_impl_tracing.mli b/lib/mirage/impl/mirage_impl_tracing.mli index 5f64c434a..d61a1d399 100644 --- a/lib/mirage/impl/mirage_impl_tracing.mli +++ b/lib/mirage/impl/mirage_impl_tracing.mli @@ -1,5 +1,4 @@ type tracing = Functoria.job val tracing : tracing Functoria.typ - val mprof_trace : size:int -> unit -> tracing Functoria.impl diff --git a/lib/mirage/impl/mirage_impl_udp.ml b/lib/mirage/impl/mirage_impl_udp.ml index 689d53c7e..7085add39 100644 --- a/lib/mirage/impl/mirage_impl_udp.ml +++ b/lib/mirage/impl/mirage_impl_udp.ml @@ -5,19 +5,13 @@ open Mirage_impl_random module Key = Mirage_key type 'a udp = UDP - type udpv4 = v4 udp - type udpv6 = v6 udp - type udpv4v6 = v4v6 udp let udp = Type.Type UDP - let udpv4 : udpv4 typ = udp - let udpv6 : udpv6 typ = udp - let udpv4v6 : udpv4v6 typ = udp (* Value restriction ... *) diff --git a/lib/mirage/impl/mirage_impl_udp.mli b/lib/mirage/impl/mirage_impl_udp.mli index 49ec5eebc..bfe20c450 100644 --- a/lib/mirage/impl/mirage_impl_udp.mli +++ b/lib/mirage/impl/mirage_impl_udp.mli @@ -3,15 +3,11 @@ type 'a udp val udp : 'a udp Functoria.typ type udpv4 = Mirage_impl_ip.v4 udp - type udpv6 = Mirage_impl_ip.v6 udp - type udpv4v6 = Mirage_impl_ip.v4v6 udp val udpv4 : udpv4 Functoria.typ - val udpv6 : udpv6 Functoria.typ - val udpv4v6 : udpv4v6 Functoria.typ val direct_udp : diff --git a/lib/mirage/mirage.ml b/lib/mirage/mirage.ml index f462ccbb1..ff8ab8ddc 100644 --- a/lib/mirage/mirage.ml +++ b/lib/mirage/mirage.ml @@ -32,139 +32,98 @@ include Functoria.DSL type qubesdb = Mirage_impl_qubesdb.qubesdb let qubesdb = Mirage_impl_qubesdb.qubesdb - let default_qubesdb = Mirage_impl_qubesdb.default_qubesdb type time = Mirage_impl_time.time let time = Mirage_impl_time.time - let default_time = Mirage_impl_time.default_time type pclock = Mirage_impl_pclock.pclock let pclock = Mirage_impl_pclock.pclock - let default_posix_clock = Mirage_impl_pclock.default_posix_clock type mclock = Mirage_impl_mclock.mclock let mclock = Mirage_impl_mclock.mclock - let default_monotonic_clock = Mirage_impl_mclock.default_monotonic_clock type random = Mirage_impl_random.random let random = Mirage_impl_random.random - let stdlib_random = Mirage_impl_random.default_random - let default_random = Mirage_impl_random.default_random - let rng = Mirage_impl_random.rng - let nocrypto = Mirage_impl_random.nocrypto - let nocrypto_random = Mirage_impl_random.default_random type console = Mirage_impl_console.console let console = Mirage_impl_console.console - let default_console = Mirage_impl_console.default_console - let custom_console = Mirage_impl_console.custom_console type kv_ro = Mirage_impl_kv.ro let kv_ro = Mirage_impl_kv.ro - let direct_kv_ro = Mirage_impl_kv.direct_kv_ro - let crunch = Mirage_impl_kv.crunch type kv_rw = Mirage_impl_kv.rw let kv_rw = Mirage_impl_kv.rw - let direct_kv_rw = Mirage_impl_kv.direct_kv_rw - let kv_rw_mem = Mirage_impl_kv.mem_kv_rw type block = Mirage_impl_block.block let block = Mirage_impl_block.block - let archive_of_files = Mirage_impl_block.archive_of_files - let archive = Mirage_impl_block.archive - let generic_block = Mirage_impl_block.generic_block - let ramdisk = Mirage_impl_block.ramdisk - let block_of_xenstore_id = Mirage_impl_block.block_of_xenstore_id - let block_of_file = Mirage_impl_block.block_of_file type fs = Mirage_impl_fs.t let fs = Mirage_impl_fs.typ - let fat = Mirage_impl_fs.fat - let fat_of_files = Mirage_impl_fs.fat_of_files - let generic_kv_ro = Mirage_impl_fs.generic_kv_ro - let kv_ro_of_fs = Mirage_impl_fs.kv_ro_of_fs type network = Mirage_impl_network.network let network = Mirage_impl_network.network - let netif = Mirage_impl_network.netif - let default_network = Mirage_impl_network.default_network type ethernet = Mirage_impl_ethernet.ethernet let ethernet = Mirage_impl_ethernet.ethernet - let etif = Mirage_impl_ethernet.etif type arpv4 = Mirage_impl_arpv4.arpv4 let arpv4 = Mirage_impl_arpv4.arpv4 - let arp = Mirage_impl_arpv4.arp type v4 = Mirage_impl_ip.v4 - type v6 = Mirage_impl_ip.v6 - type v4v6 = Mirage_impl_ip.v4v6 - type 'a ip = 'a Mirage_impl_ip.ip - type ipv4 = Mirage_impl_ip.ipv4 - type ipv6 = Mirage_impl_ip.ipv6 - type ipv4v6 = Mirage_impl_ip.ipv4v6 let ipv4 = Mirage_impl_ip.ipv4 - let ipv6 = Mirage_impl_ip.ipv6 - let ipv4_qubes = Mirage_impl_ip.ipv4_qubes - let ipv4v6 = Mirage_impl_ip.ipv4v6 - let create_ipv4 = Mirage_impl_ip.create_ipv4 - let create_ipv6 = Mirage_impl_ip.create_ipv6 - let create_ipv4v6 = Mirage_impl_ip.create_ipv4v6 type ipv4_config = Mirage_impl_ip.ipv4_config = { @@ -182,23 +141,15 @@ type 'a udp = 'a Mirage_impl_udp.udp let udp = Mirage_impl_udp.udp type udpv4 = Mirage_impl_udp.udpv4 - type udpv6 = Mirage_impl_udp.udpv6 - type udpv4v6 = Mirage_impl_udp.udpv4v6 let udpv4 = Mirage_impl_udp.udpv4 - let udpv6 = Mirage_impl_udp.udpv6 - let udpv4v6 = Mirage_impl_udp.udpv4v6 - let direct_udp = Mirage_impl_udp.direct_udp - let socket_udpv4 = Mirage_impl_udp.socket_udpv4 - let socket_udpv6 = Mirage_impl_udp.socket_udpv6 - let socket_udpv4v6 = Mirage_impl_udp.socket_udpv4v6 type 'a tcp = 'a Mirage_impl_tcp.tcp @@ -206,87 +157,59 @@ type 'a tcp = 'a Mirage_impl_tcp.tcp let tcp = Mirage_impl_tcp.tcp type tcpv4 = Mirage_impl_tcp.tcpv4 - type tcpv6 = Mirage_impl_tcp.tcpv6 - type tcpv4v6 = Mirage_impl_tcp.tcpv4v6 let tcpv4 = Mirage_impl_tcp.tcpv4 - let tcpv6 = Mirage_impl_tcp.tcpv6 - let tcpv4v6 = Mirage_impl_tcp.tcpv4v6 - let direct_tcp = Mirage_impl_tcp.direct_tcp - let socket_tcpv4 = Mirage_impl_tcp.socket_tcpv4 - let socket_tcpv6 = Mirage_impl_tcp.socket_tcpv6 - let socket_tcpv4v6 = Mirage_impl_tcp.socket_tcpv4v6 type stackv4 = Mirage_impl_stack.stackv4 let stackv4 = Mirage_impl_stack.stackv4 - let generic_stackv4 = Mirage_impl_stack.generic_stackv4 - let static_ipv4_stack = Mirage_impl_stack.static_ipv4_stack - let dhcp_ipv4_stack = Mirage_impl_stack.dhcp_ipv4_stack - let qubes_ipv4_stack = Mirage_impl_stack.qubes_ipv4_stack - let direct_stackv4 = Mirage_impl_stack.direct_stackv4 - let socket_stackv4 = Mirage_impl_stack.socket_stackv4 type stackv6 = Mirage_impl_stack.stackv6 let stackv6 = Mirage_impl_stack.stackv6 - let generic_stackv6 = Mirage_impl_stack.generic_stackv6 - let static_ipv6_stack = Mirage_impl_stack.static_ipv6_stack - let direct_stackv6 = Mirage_impl_stack.direct_stackv6 - let socket_stackv6 = Mirage_impl_stack.socket_stackv6 type stackv4v6 = Mirage_impl_stack.stackv4v6 let stackv4v6 = Mirage_impl_stack.stackv4v6 - let generic_stackv4v6 = Mirage_impl_stack.generic_stackv4v6 - let static_ipv4v6_stack = Mirage_impl_stack.static_ipv4v6_stack - let direct_stackv4v6 = Mirage_impl_stack.direct_stackv4v6 - let socket_stackv4v6 = Mirage_impl_stack.socket_stackv4v6 type conduit = Mirage_impl_conduit.conduit let conduit = Mirage_impl_conduit.conduit - let conduit_direct = Mirage_impl_conduit.conduit_direct type resolver = Mirage_impl_resolver.resolver let resolver = Mirage_impl_resolver.resolver - let resolver_unix_system = Mirage_impl_resolver.resolver_unix_system - let resolver_dns = Mirage_impl_resolver.resolver_dns type syslog = Mirage_impl_syslog.syslog let syslog = Mirage_impl_syslog.syslog - let syslog_tls = Mirage_impl_syslog.syslog_tls - let syslog_tcp = Mirage_impl_syslog.syslog_tcp - let syslog_udp = Mirage_impl_syslog.syslog_udp type syslog_config = Mirage_impl_syslog.syslog_config = { @@ -301,39 +224,30 @@ let syslog_config = Mirage_impl_syslog.syslog_config type http = Mirage_impl_http.http let http = Mirage_impl_http.http - let http_server = Mirage_impl_http.cohttp_server - let cohttp_server = Mirage_impl_http.cohttp_server - let httpaf_server = Mirage_impl_http.httpaf_server type http_client = Mirage_impl_http.http_client let http_client = Mirage_impl_http.http_client - let cohttp_client = Mirage_impl_http.cohttp_client type argv = Functoria.argv let argv = Functoria.argv - let default_argv = Mirage_impl_argv.default_argv - let no_argv = Mirage_impl_argv.no_argv type reporter = Mirage_impl_reporter.reporter let reporter = Mirage_impl_reporter.reporter - let default_reporter = Mirage_impl_reporter.default_reporter - let no_reporter = Mirage_impl_reporter.no_reporter type tracing = Mirage_impl_tracing.tracing let tracing = Mirage_impl_tracing.tracing - let mprof_trace = Mirage_impl_tracing.mprof_trace (** Functoria devices *) @@ -342,21 +256,17 @@ let mprof_trace = Mirage_impl_tracing.mprof_trace (* type info = Functoria.info *) let job = Functoria.job - let noop = Functoria.noop - let info = Functoria.info let app_info_partial = Functoria.app_info ~runtime_package:"mirage-runtime" ~modname:"Mirage_runtime" let app_info = app_info_partial () - let app_info_with_opam_deps opam_list = app_info_partial ~opam_list () module Project = struct let name = "mirage" - let version = "%%VERSION%%" let prelude = @@ -376,7 +286,6 @@ module Project = struct Fmt.str "%s-%a" name Key.pp_target target let dune i = Mirage_target.dune i - let configure i = Mirage_target.configure i let dune_project = diff --git a/lib/mirage/mirage.mli b/lib/mirage/mirage.mli index acac005e2..64d1cb053 100644 --- a/lib/mirage/mirage.mli +++ b/lib/mirage/mirage.mli @@ -278,7 +278,6 @@ val crunch : string -> kv_ro impl (** Crunch a directory. *) val archive : block impl -> kv_ro impl - val archive_of_files : ?dir:string -> unit -> kv_ro impl val direct_kv_ro : string -> kv_ro impl @@ -366,18 +365,14 @@ val arp : ?time:time impl -> ethernet impl -> arpv4 impl Implementations of the [Mirage_types.IP] signature. *) type v4 - type v6 - type v4v6 type 'a ip (** Abstract type for IP configurations. *) type ipv4 = v4 ip - type ipv6 = v6 ip - type ipv4v6 = v4v6 ip val ipv4 : ipv4 typ @@ -441,26 +436,18 @@ val create_ipv4v6 : ?group:string -> ipv4 impl -> ipv6 impl -> ipv4v6 impl (** {2 UDP configuration} *) type 'a udp - type udpv4 = v4 udp - type udpv6 = v6 udp - type udpv4v6 = v4v6 udp val udp : 'a udp typ (** Implementation of the [Mirage_types.UDP] signature. *) val udpv4 : udpv4 typ - val udpv6 : udpv6 typ - val udpv4v6 : udpv4v6 typ - val direct_udp : ?random:random impl -> 'a ip impl -> 'a udp impl - val socket_udpv4 : ?group:string -> Ipaddr.V4.t option -> udpv4 impl - val socket_udpv6 : ?group:string -> Ipaddr.V6.t option -> udpv6 impl val socket_udpv4v6 : @@ -469,20 +456,15 @@ val socket_udpv4v6 : (** {2 TCP configuration} *) type 'a tcp - type tcpv4 = v4 tcp - type tcpv6 = v6 tcp - type tcpv4v6 = v4v6 tcp val tcp : 'a tcp typ (** Implementation of the [Mirage_types.TCP] signature. *) val tcpv4 : tcpv4 typ - val tcpv6 : tcpv6 typ - val tcpv4v6 : tcpv4v6 typ val direct_tcp : @@ -493,7 +475,6 @@ val direct_tcp : 'a tcp impl val socket_tcpv4 : ?group:string -> Ipaddr.V4.t option -> tcpv4 impl - val socket_tcpv6 : ?group:string -> Ipaddr.V6.t option -> tcpv6 impl val socket_tcpv4v6 : @@ -851,7 +832,6 @@ end module Project : sig val dune : Info.t -> Dune.stanza list - val configure : Info.t -> unit Action.t end diff --git a/lib/mirage/mirage_key.ml b/lib/mirage/mirage_key.ml index 7b34ad75f..0e8cb0c14 100644 --- a/lib/mirage/mirage_key.ml +++ b/lib/mirage/mirage_key.ml @@ -39,7 +39,6 @@ module Arg = struct type t val of_string : string -> (t, [ `Msg of string ]) result - val to_string : t -> string end @@ -47,22 +46,16 @@ module Arg = struct make d m M.of_string M.to_string let ipv4_address = of_module "ipv4_address" "Ipaddr.V4" (module Ipaddr.V4) - let ipv4 = of_module "ipv4" "Ipaddr.V4.Prefix" (module Ipaddr.V4.Prefix) - let ipv6_address = of_module "ipv6_address" "Ipaddr.V6" (module Ipaddr.V6) - let ipv6 = of_module "ipv6" "Ipaddr.V6.Prefix" (module Ipaddr.V6.Prefix) - let ip_address = of_module "ip_address" "Ipaddr" (module Ipaddr) end (** {2 Documentation helper} *) let mirage_section = "MIRAGE PARAMETERS" - let unikernel_section = "UNIKERNEL PARAMETERS" - let pp_group = Fmt.(option ~none:(any "the unikernel") @@ fmt "the %s group") (** {2 Special keys} *) @@ -70,11 +63,8 @@ let pp_group = Fmt.(option ~none:(any "the unikernel") @@ fmt "the %s group") (** {3 Mode} *) type mode_unix = [ `Unix | `MacOSX ] - type mode_xen = [ `Xen | `Qubes ] - type mode_solo5 = [ `Hvt | `Spt | `Virtio | `Muen | `Genode ] - type mode = [ mode_unix | mode_xen | mode_solo5 ] let first_ukvm_mention = ref true diff --git a/lib/mirage/mirage_key.mli b/lib/mirage/mirage_key.mli index de7edb539..75aa67e6a 100644 --- a/lib/mirage/mirage_key.mli +++ b/lib/mirage/mirage_key.mli @@ -24,13 +24,9 @@ module Arg : sig end val ipv4_address : Ipaddr.V4.t converter - val ipv4 : Ipaddr.V4.Prefix.t converter - val ipv6_address : Ipaddr.V6.t converter - val ipv6 : Ipaddr.V6.Prefix.t converter - val ip_address : Ipaddr.t converter end @@ -39,11 +35,8 @@ include Functoria.KEY with module Arg := Arg val abstract : 'a key -> t [@@ocaml.deprecated "Use Mirage.Key.v."] type mode_unix = [ `Unix | `MacOSX ] - type mode_xen = [ `Xen | `Qubes ] - type mode_solo5 = [ `Hvt | `Spt | `Virtio | `Muen | `Genode ] - type mode = [ mode_unix | mode_xen | mode_solo5 ] (** {2 Mirage keys} *) @@ -96,23 +89,14 @@ val randomize_hashtables : bool key The following keys allow boot time configuration. *) val allocation_policy : [ `Next_fit | `First_fit | `Best_fit ] key - val minor_heap_size : int option key - val major_heap_increment : int option key - val space_overhead : int option key - val max_space_overhead : int option key - val gc_verbosity : int option key - val gc_window_size : int option key - val custom_major_ratio : int option key - val custom_minor_ratio : int option key - val custom_minor_max_size : int option key (** {2 Generic keys} diff --git a/lib/mirage/target/libvirt.ml b/lib/mirage/target/libvirt.ml index aa858069f..45c985bc7 100644 --- a/lib/mirage/target/libvirt.ml +++ b/lib/mirage/target/libvirt.ml @@ -1,7 +1,6 @@ open Functoria let filename ~name = Fpath.(v (name ^ "_libvirt") + "xml") - let append fmt s = Fmt.pf fmt (s ^^ "@.") let configure_main ~name = diff --git a/lib/mirage/target/libvirt.mli b/lib/mirage/target/libvirt.mli index 33677fb99..56512ec2e 100644 --- a/lib/mirage/target/libvirt.mli +++ b/lib/mirage/target/libvirt.mli @@ -1,7 +1,5 @@ open Functoria val filename : name:string -> Fpath.t - val configure_main : name:string -> unit Action.t - val configure_virtio : name:string -> unit Action.t diff --git a/lib/mirage/target/solo5.ml b/lib/mirage/target/solo5.ml index 42ed15a45..797eeb686 100644 --- a/lib/mirage/target/solo5.ml +++ b/lib/mirage/target/solo5.ml @@ -5,15 +5,11 @@ module Key = Mirage_key module Log = Mirage_impl_misc.Log let solo5_manifest_path = Fpath.v "manifest.json" - let flags_generator target = Fmt.str "%a-ldflags.sh" Key.pp_target target - let flags_file target = Fmt.str "%a-ldflags" Key.pp_target target type solo5_target = [ `Virtio | `Muen | `Hvt | `Genode | `Spt ] - type xen_target = [ `Xen | `Qubes ] - type t = [ solo5_target | xen_target ] let cast = function #t as t -> t | _ -> invalid_arg "not a solo5 target." diff --git a/lib/mirage/target/unix.ml b/lib/mirage/target/unix.ml index 9285438b4..3bbacd589 100644 --- a/lib/mirage/target/unix.ml +++ b/lib/mirage/target/unix.ml @@ -4,18 +4,13 @@ module Key = Mirage_key type t = [ `Unix | `MacOSX ] let cast = function #t as t -> t | _ -> invalid_arg "not a unix target." - let packages _ = [ Functoria.package ~min:"4.0.1" ~max:"5.0.0" "mirage-unix" ] (*Mirage unix is built on the host build context.*) let build_context ?build_dir:_ _ = [] - let context_name _ = "default" - let configure _ = Action.ok () - let main i = Fpath.(base (rem_ext (Info.main i))) - let public_name i = match Info.output i with None -> Info.name i | Some o -> o let dune i = diff --git a/lib/mirage/target/xen.mli b/lib/mirage/target/xen.mli index bf15004a8..ad8fbf09e 100644 --- a/lib/mirage/target/xen.mli +++ b/lib/mirage/target/xen.mli @@ -11,7 +11,6 @@ module Substitutions : sig type t = (v * string) list val lookup : t -> v -> string - val defaults : Functoria.Info.t -> t end diff --git a/lib_runtime/functoria/functoria_runtime.ml b/lib_runtime/functoria/functoria_runtime.ml index 3d69d0b42..ae12220e7 100644 --- a/lib_runtime/functoria/functoria_runtime.ml +++ b/lib_runtime/functoria/functoria_runtime.ml @@ -23,9 +23,7 @@ module Arg = struct type 'a t = { info : Cmdliner.Arg.info; kind : 'a kind } let flag info = { info; kind = Flag } - let opt conv default info = { info; kind = Opt (default, conv) } - let required conv info = { info; kind = Required conv } let key ?default c i = @@ -38,7 +36,6 @@ module Arg = struct | Required _ -> None let kind t = t.kind - let info t = t.info end diff --git a/lib_runtime/mirage/mirage_runtime.ml b/lib_runtime/mirage/mirage_runtime.ml index 7da582cc1..f05402777 100644 --- a/lib_runtime/mirage/mirage_runtime.ml +++ b/lib_runtime/mirage/mirage_runtime.ml @@ -52,7 +52,6 @@ module Arg = struct type t val of_string : string -> (t, [ `Msg of string ]) result - val to_string : t -> string end @@ -60,13 +59,9 @@ module Arg = struct make M.of_string M.to_string let ip_address = of_module (module Ipaddr) - let ipv4_address = of_module (module Ipaddr.V4) - let ipv4 = of_module (module Ipaddr.V4.Prefix) - let ipv6_address = of_module (module Ipaddr.V6) - let ipv6 = of_module (module Ipaddr.V6.Prefix) let log_threshold = @@ -112,13 +107,9 @@ include ( Functoria_runtime : module type of Functoria_runtime with module Arg := Arg) let exit_hooks = ref [] - let enter_iter_hooks = ref [] - let leave_iter_hooks = ref [] - let run t = List.iter (fun f -> f ()) !t - let add f t = t := f :: !t let run_exit_hooks () = @@ -127,11 +118,7 @@ let run_exit_hooks () = !exit_hooks let run_enter_iter_hooks () = run enter_iter_hooks - let run_leave_iter_hooks () = run leave_iter_hooks - let at_exit f = add f exit_hooks - let at_leave_iter f = add f leave_iter_hooks - let at_enter_iter f = add f enter_iter_hooks diff --git a/lib_runtime/mirage/mirage_runtime.mli b/lib_runtime/mirage/mirage_runtime.mli index 58f8df536..a99543d10 100644 --- a/lib_runtime/mirage/mirage_runtime.mli +++ b/lib_runtime/mirage/mirage_runtime.mli @@ -45,7 +45,6 @@ module Arg : sig type t val of_string : string -> (t, [ `Msg of string ]) result - val to_string : t -> string end diff --git a/test/f0/f0.ml b/test/f0/f0.ml index 38f1c7cef..e3ed05d42 100644 --- a/test/f0/f0.ml +++ b/test/f0/f0.ml @@ -27,15 +27,10 @@ module C = struct open Action.Syntax let prelude = "" - let name = "test" - let version = "1.0~test" - let packages = [ package "functoria"; package "f0" ] - let keys = Key.[ v vote; v warn_error ] - let connect _ _ _ = "()" let dune i = @@ -66,11 +61,8 @@ module C = struct "F0" job let name_of_target i = Info.name i - let dune_project = [] - let dune_workspace = None - let context_name _ = "default" end diff --git a/test/functoria/context/config.ml b/test/functoria/context/config.ml index 10bc26105..19e451e4e 100644 --- a/test/functoria/context/config.ml +++ b/test/functoria/context/config.ml @@ -2,7 +2,6 @@ open F0 open Functoria let x = Impl.v ~packages:[ package "x" ] "X" job - let y = Impl.v ~packages:[ package "y" ] "Y" job let target = @@ -10,5 +9,4 @@ let target = Key.(create "target" Arg.(opt string "x" doc)) let main = match_impl (Key.value target) ~default:y [ ("x", x) ] - let () = register ~src:`None "noop" [ main ] diff --git a/test/functoria/e2e/lib/e2e.ml b/test/functoria/e2e/lib/e2e.ml index 656c977b4..c05b73b3f 100644 --- a/test/functoria/e2e/lib/e2e.ml +++ b/test/functoria/e2e/lib/e2e.ml @@ -25,17 +25,11 @@ module C = struct open Action.Syntax let prelude = "let (>>=) x f = f x\nlet return x = x\nlet run x = x" - let name = "test" - let version = "1.0~test" - let packages = [ package "functoria"; package "e2e" ] - let keys = Key.[ v vote; v warn_error ] - let connect _ _ _ = "()" - let main i = Fpath.(basename @@ rem_ext @@ Info.main i) let dune i = @@ -64,11 +58,8 @@ module C = struct job let name_of_target i = Info.name i - let dune_project = [] - let dune_workspace = None - let context_name _ = "default" end diff --git a/test/functoria/test_action.ml b/test/functoria/test_action.ml index ee1f4c3e7..be6a70487 100644 --- a/test/functoria/test_action.ml +++ b/test/functoria/test_action.ml @@ -2,21 +2,13 @@ open Functoria open Action.Syntax let pp_unit ppf () = Fmt.string ppf "()" - let domain pp = Alcotest.testable (Action.pp_domain pp) (Action.eq_domain ( = )) - let file = "" - let dir = "" - let error e = Error (`Msg e) - let ( ! ) files = Action.env ~files:(`Files files) () - let path = Fpath.v "path" - let other_path = Fpath.v "other_path" - let dom result env logs = { Action.result; env; logs } let test_bind () = @@ -233,9 +225,7 @@ let test_get_var () = ~expected:(dom (Ok None) env [ "Get_var var -> " ]) let none _ = None - let yay _ = Some ("yay", "") - let yay_err _ = Some ("yay", "err") let test_run_cmd () = diff --git a/test/functoria/test_cli.ml b/test/functoria/test_cli.ml index 4cc6c19bf..ff2372ddc 100644 --- a/test/functoria/test_cli.ml +++ b/test/functoria/test_cli.ml @@ -14,7 +14,6 @@ let result_t pp_a = Alcotest.testable pp ( = ) let result_b = result_t Fmt.(Dump.pair bool bool) - let eval = Cli.eval ~with_setup:false ~name:"name" ~version:"0.2" let test_configure () = diff --git a/test/functoria/test_graph.ml b/test/functoria/test_graph.ml index f79b850cf..2a4c6661c 100644 --- a/test/functoria/test_graph.ml +++ b/test/functoria/test_graph.ml @@ -1,9 +1,7 @@ open Functoria let x = Impl.v "Foo.Bar" Functoria.job - let y = Impl.v "X.Y" Functoria.(job @-> job) ~extra_deps:[ Impl.abstract x ] - let z = Impl.v "Bar" job ~extra_deps:[ Impl.abstract y ] let z, y, x = @@ -14,9 +12,7 @@ let z, y, x = | _ -> assert false let var_name x = Device.Graph.var_name x - let impl_name x = Device.Graph.impl_name x - let ident s i = Fmt.str "%s__%d" s i let test_var_name () = @@ -30,15 +26,10 @@ let test_impl_name () = Alcotest.(check string) "z" "Bar" (impl_name z) let d1 = Device.v ~packages:[ package "a" ] "Foo.Bar" job - let d2 = Device.v ~packages:[ package "b" ] "Foo.Bar" job - let i1 = of_device d1 - let i2 = of_device d2 - let if1 = if_impl (Key.pure true) i1 i2 - let if2 = if_impl (Key.pure true) i2 i1 let normalise_lines str = @@ -77,7 +68,6 @@ let test_graph () = type t = (string * string list) list let empty = [] - let union = List.append end in let packages t = diff --git a/test/functoria/test_key.ml b/test/functoria/test_key.ml index a1d5f7fab..a3dec1867 100644 --- a/test/functoria/test_key.ml +++ b/test/functoria/test_key.ml @@ -1,16 +1,13 @@ open Functoria let key_a = Key.create "a" Key.Arg.(flag @@ info [ "a" ]) - let key_b = Key.create "b" Key.Arg.(opt int 0 @@ info [ "b" ]) let key_c = Key.create "c" Key.Arg.(required ~stage:`Configure string @@ info [ "c" ]) let empty = Key.empty_context - let ( & ) (k, v) c = Key.add_to_context k v c - let ( && ) x y = x & y & empty let test_eval () = diff --git a/test/functoria/test_package.ml b/test/functoria/test_package.ml index 7e9eafeeb..d368d9a36 100644 --- a/test/functoria/test_package.ml +++ b/test/functoria/test_package.ml @@ -1,11 +1,8 @@ open Functoria let w = Package.v ~min:"1.0" ~max:"2.0" "foo" ~scope:`Switch - let x = Package.v ~min:"1.0" ~max:"2.0" "foo" - let y = Package.v ~min:"0.9" ~max:"1.9" ~sublibs:[ "bar" ] "foo" - let z = Package.v "bar" ~sublibs:[ "foo" ] ~min:"42" let xy = diff --git a/test/mirage-runtime/test.ml b/test/mirage-runtime/test.ml index 4cd382ff8..ad47109f1 100644 --- a/test/mirage-runtime/test.ml +++ b/test/mirage-runtime/test.ml @@ -1,5 +1,3 @@ let t = { Mirage_runtime.name = "foo"; libraries = [ "bar" ]; packages = [] } - let test_info () = Alcotest.(check string) "name" t.name "foo" - let () = Alcotest.run "mirage" [ ("basic", [ ("info", `Quick, test_info) ]) ] diff --git a/test/mirage/query/gen.ml b/test/mirage/query/gen.ml index 95026b6e2..08266e708 100644 --- a/test/mirage/query/gen.ml +++ b/test/mirage/query/gen.ml @@ -6,7 +6,6 @@ type t = { } let target_str = function `Unix -> "unix" | `Hvt -> "hvt" - let v ?args x target = { cmd = "query " ^ x; file = x; target; args } let gen t =