For note, for a quick-check if a module exists I just do something like:
```elixir
╰─➤ iex
Erlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:10] [hipe] [kernel-poll:false]
Interactive Elixir (1.6.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> function_exported?(String, :module_info, 0)
true
iex(2)> function_exported?(SomeModule, :module_info, 0)
false
```
This *only* works on modules already loaded in memory (which the afore-mentioned `Code.ensure_loaded/1` and `Code.ensure_compiled/1` do in various ways), but in production running in embedded mode that's fine (it's always the case for me, but be aware of your cases).
The reason this works as that the BEAM VM requires a `module_info/0` function on the BEAM module as it uses it for various things, so it's easy just to test for the existence of this function.
You can always try calling `blahmodule.module_info()` and catch the exception if it doesn't exist, this should force loading so should be faster then the `Code.*` calls but still not as fast as `function_exported?` though.