在文件~/.iex.exs
中,我有一个定义了几个函数的模块,我想从iex
shell 调用这些函数,而不需要模块名称前缀。
使用import SomeModule
不起作用,我收到错误:
module SomeModule is not loaded but was defined. This happens because you are trying to use a module in the same context it is defined. Try defining the module outside the context that requires it.
有没有办法做到这一点~/.iex.exs
?