【发布时间】:2015-12-11 16:19:33
【问题描述】:
在文件 ~/.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 中有没有办法做到这一点?
【问题讨论】:
标签: elixir elixir-iex