Created
February 11, 2021 11:38
-
-
Save leostera/8236972fe076d3cce5c7fcbef025b566 to your computer and use it in GitHub Desktop.
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
open Cmdliner | |
(* our echo function just prints stuff out *) | |
let echo x = print_string x | |
(* this is our argument *) | |
let msg = Arg.(value & pos 0 string "" & info []) | |
(* this is our program *) | |
let echo_t = Term.(const echo $ msg) | |
let () = Term.exit @@ Term.eval (echo_t, Term.info "echo") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment