25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-30 16:36:29 +01:00

Change syntax of type declarations so Dialyzer accepts them

This commit is contained in:
Badlop 2010-08-02 23:45:51 +02:00
parent b28b9686fe
commit 8cd32f9706

View File

@ -46,9 +46,9 @@ behaviour_info(callbacks) ->
behaviour_info(_) -> behaviour_info(_) ->
undefined. undefined.
-type storage_host() :: binary(). -type(storage_host() :: binary()).
-type storage_table() :: atom(). -type(storage_table() :: atom()).
-type lock_kind() :: read | write | sticky_write. -type(lock_kind() :: read | write | sticky_write).
-record(table, {host_name :: {storage_host(), storage_table()}, -record(table, {host_name :: {storage_host(), storage_table()},
backend :: atom(), backend :: atom(),
def :: any()}). def :: any()}).
@ -192,17 +192,17 @@ dirty_read(Host, Tab, Key) ->
%% select/3 %% select/3
-type matchvalue() :: '_' -type(matchvalue() :: '_'
| integer() | integer()
| string(). | string()).
%% | {matchvalue(), matchrule()}. %% | {matchvalue(), matchrule()}.
-type matchrule() :: {'and', matchrule(), matchrule()} -type(matchrule() :: {'and', matchrule(), matchrule()}
| {'andalso', matchrule(), matchrule()} | {'andalso', matchrule(), matchrule()}
| {'or', matchrule(), matchrule()} | {'or', matchrule(), matchrule()}
| {'orelse', matchrule(), matchrule()} | {'orelse', matchrule(), matchrule()}
| {'=', Attribute::atom(), matchvalue()} | {'=', Attribute::atom(), matchvalue()}
| {'=/=', Attribute::atom(), matchvalue()} | {'=/=', Attribute::atom(), matchvalue()}
| {like, Attribute::atom(), matchvalue()}. | {like, Attribute::atom(), matchvalue()}).
%% For the like operator the last element (not the tail as in %% For the like operator the last element (not the tail as in
%% matchspecs) may be '_'. %% matchspecs) may be '_'.