Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added initial typespec for specification files

  • Loading branch information...
commit edb6c9affa7ccc0929672471e162d1abd4c7b77e 1 parent e74c3fa
Yurii Rashkovskii yrashk authored
Showing with 36 additions and 4 deletions.
  1. +2 −4 include/agner.hrl
  2. +34 −0 include/agner_spec.hrl
6 include/agner.hrl
View
@@ -2,10 +2,6 @@
-type agner_spec_version() :: {branch, string()} |
{tag, string()}.
--type agner_key() :: term().
--type agner_value() :: term().
--type agner_spec() :: list({agner_key(), agner_value()}).
-
-type agner_repo() :: string().
-type agner_repo_tag() :: string().
-type agner_repo_branch() :: string().
@@ -18,3 +14,5 @@
-type not_found_error() :: {error, not_found}.
-type directory() :: string().
+
+-include_lib("agner_spec.hrl").
34 include/agner_spec.hrl
View
@@ -0,0 +1,34 @@
+-type url() :: string().
+
+-type git_ref() :: sha1() |
+ {branch, string()} |
+ {tag, string()}.
+
+-type hg_rev() :: string().
+
+-type file() :: string().
+
+-type agner_spec_property_name() :: {name, string()}.
+-type agner_spec_property_description() :: {description, string()}.
+-type agner_spec_property_authors() :: {authors, list(string())}.
+-type agner_spec_property_homepage() :: {homepage, string()}.
+-type agner_spec_property_rebar_compatible() :: {rebar_compatible, boolean()}.
+-type agner_spec_property_license() :: {license, string(), file()} |
+ {license, string()}.
+-type agner_spec_property_erlang_versions() :: {erlang_versions, list(atom())}.
+-type agner_spec_property_url() :: {url,
+ {git, url(), git_ref()} |
+ {hg, url(), hg_rev()}}.
+
+
+
+-type agner_spec_property() :: agner_spec_property_name() |
+ agner_spec_property_description() |
+ agner_spec_property_authors() |
+ agner_spec_property_homepage() |
+ agner_spec_property_rebar_compatible() |
+ agner_spec_property_license() |
+ agner_spec_property_erlang_versions() |
+ agner_spec_property_url().
+
+-type agner_spec() :: list(agner_spec_property()).
Please sign in to comment.
Something went wrong with that request. Please try again.