Have you guys looked into Dialyzer?
Dialyzer is a static analysis tool for Erlang and other languages that compile to BEAM bytecode for the Erlang VM. It can analyze the BEAM files and provide warnings about problems in your code including type mismatches and other issues that are commonly detected by static language compilers. The analysis can be improved by inclusion of type hints (called specs) but it can be useful even without those. For more information I highly recommend the Success Typings paper that describes the theory behind the tool.
That's from the Dialyxir (for using Dialyzer w/Elixir) github page: https://github.com/jeremyjh/dialyxir
More: http://learnyousomeerlang.com/dialyzer
(Perhaps this should be read first: http://learnyousomeerlang.com/types-or-lack-thereof )
And this is the Success Types paper behind it (mentioned in the excerpt above):
https://www.it.uu.se/research/group/hipe/papers/succ_types.p...