Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
297 additions
and
304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
open Satyrographos | ||
open Core | ||
|
||
open Setup | ||
|
||
|
||
let library_show_command_g p_show = | ||
let open Command.Let_syntax in | ||
Command.basic | ||
~summary:"Show library information (experimental)" | ||
[%map_open | ||
let p = anon ("LIBRARY" %: string) | ||
in | ||
fun () -> | ||
p_show p () | ||
] | ||
let library_list_command_g p_list = | ||
let open Command.Let_syntax in | ||
Command.basic | ||
~summary:"Show list of libraries installed (experimental)" | ||
[%map_open | ||
let _ = args (* ToDo: Remove this *) | ||
in | ||
fun () -> | ||
p_list () | ||
] | ||
|
||
let library_list () = | ||
Compatibility.optin (); | ||
[%derive.show: string list] (Registry.list reg) |> print_endline | ||
let library_list_command = | ||
library_list_command_g library_list | ||
|
||
let library_show p () = | ||
Compatibility.optin (); | ||
Registry.directory reg p | ||
|> Library.read_dir | ||
|> [%sexp_of: Library.t] | ||
|> Sexp.to_string_hum | ||
|> print_endline | ||
let library_show_command = | ||
library_show_command_g library_show | ||
|
||
let library_command = | ||
Command.group ~summary:"Install libraries (experimental)" | ||
[ "list", library_list_command; (* ToDo: use this default*) | ||
"show", library_show_command; | ||
] | ||
|
||
|
||
let library_opam_list () = | ||
Compatibility.optin (); | ||
Option.iter reg_opam ~f:(fun reg_opam -> | ||
[%derive.show: string list] (SatysfiRegistry.list reg_opam) |> print_endline | ||
) | ||
let library_opam_list_command = | ||
library_list_command_g library_opam_list | ||
|
||
let library_opam_show p () = | ||
Compatibility.optin (); | ||
Option.iter reg_opam ~f:(fun reg_opam -> | ||
SatysfiRegistry.directory reg_opam p | ||
|> Library.read_dir | ||
|> [%sexp_of: Library.t] | ||
|> Sexp.to_string_hum | ||
|> print_endline | ||
) | ||
let library_opam_show_command = | ||
library_show_command_g library_opam_show | ||
|
||
let library_opam_command = | ||
Command.group ~summary:"Inspect libraries installed in the OPAM managed directory (experimental)" | ||
[ "list", library_opam_list_command; (* ToDo: use this default*) | ||
"show", library_opam_show_command; | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.