Skip to content

Instantly share code, notes, and snippets.

@savonarola
Created January 9, 2017 20:21
Show Gist options
  • Save savonarola/b1fc923aebeaf614adabeb56cac058c3 to your computer and use it in GitHub Desktop.
Save savonarola/b1fc923aebeaf614adabeb56cac058c3 to your computer and use it in GitHub Desktop.
defmodule ParseResult do
@type arg_value :: term
@type flag_value :: boolean | pos_integer
@type option_value :: term | [term]
@type t :: %ParseResult{
args: %{atom => arg_value},
flags: %{atom => flag_value},
options: %{atom => option_value},
unknown: [String.t]
}
defstruct [
args: %{},
flags: %{},
options: %{},
unknown: []
]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment