inaka/erlang_guidelines — pull request #29 by elbrujohalcon (2014-12-17 05:10:27+00:00)
Title: Get your types together!

***
##### rule
> Place all types at the beginning of the file

```erlang
%% bad
-type a_type() :: term().
-spec a_fun(a_type()) -> ok.

-type another_type() :: term().

%% good
-type a_type() :: term().
-type another_type() :: term().

-spec a_fun(a_type()) -> ok.
```

##### reasoning
It's easier to find all types defined in a module. Also, it matches the documentation generated by edoc.