No, there's no straightforward way to do this. I can think of a couple evil ways.
As far as import, require, use here's the way I think of it.
import Foo - You're importing the name space, you're going to call Foo.func1 as func1 in your code.
require Foo - You need the Foo module to be loaded into the BEAM for your code to work, you're going to use Foo.func1 in your code.
if Foo.func1 is a macro, you definitely need to require it. Mix does all of this for you at runtime for regular functions,
but at compile time,( when you use macros) it has to be specified.
use Foo - Does the same thing as require Foo, but also calls the __using__ macro in the module you are using. This is to
define code IN THE CALLING module from the called module.
The closet analogue to this I can think of is Ruby modules that consist of just functions that you can include in
any object, but it's not exactly the same.
- Booker c. Bense