Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A little library for parsing command-line args in OCaml
OCaml
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
META
Makefile
README.md
aerger.ml
aerger.mli
test.ml

README.md

A little library for parsing command-line args.

let awesomeness, is_fast, color = Aerger.(
  with_usage "demo --awesomeness=99 -c BLUE --go_faster" (fun _ ->
    require (float ~names:["awesomeness"] ~desc:"How awesome to be" ~default:11.),
    require (bool ["go_faster"]),
    match get (enum ["c"; "color"] ["RED"; "GREEN"; "BLUE"]) with | Some color -> color | None -> "unspecified"
  )
) in

Printf.printf "fast? %b\nawesomeness: %f\ncolor: %s\n" is_fast awesomeness color;
List.iter print_endline (Aerger.rest ())
Something went wrong with that request. Please try again.