inaka/erlang_guidelines — pull request #6 by elbrujohalcon (2014-09-15 20:56:38+00:00)
Title: Suggestion: Do not share types by including them in hrl files.

##### rule
> No ``-type`` in hrl files

```erlang
%% bad
-type my_type() :: [another_type()].
```

##### reasoning
Defining types in public header files (especially those intended for inclusion via `-include_lib()`) might lead to type name clashes between projects and even modules of a single big project.
Instead, types should be defined in modules which they correspond to (with `-export_type()`) and this way take advantage of the namespacing offered by module names.
In other words, "no type definitions in header files" rule means that we will always need to use `some_mod:some_type()` unless referring to a type from the same module it's defined in.