Add typespecs to the functions

This commit is contained in:
Carlos Martín Nieto
2013-01-25 03:33:02 +01:00
parent 3c6b1ddaf5
commit 78e0693b8a
4 changed files with 13 additions and 4 deletions

View File

@@ -4,19 +4,23 @@
-include("geef_records.hlr").
-spec path(repo()) -> binary().
path(#repo{handle=Handle}) ->
geef:repository_get_path(Handle).
-spec workdir(repo()) -> binary().
workdir(#repo{handle=Handle}) ->
geef:repository_get_workdir(Handle).
-spec is_bare(repo()) -> boolean().
is_bare(#repo{handle=Handle}) ->
geef:repository_is_bare(Handle).
-spec references(repo()) -> [binary()].
references(#repo{handle=Handle}) ->
geef:reference_list(Handle).
-spec open(iolist()) -> {ok, term()} | {error, term()}.
-spec open(iolist()) -> {ok, repo()} | {error, term()}.
open(Path) ->
case geef:repository_open(Path) of
{ok, Handle} ->