Skip to content

Instantly share code, notes, and snippets.

@alco
Created May 14, 2015 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alco/2a75e1979feaeec47d91 to your computer and use it in GitHub Desktop.
Save alco/2a75e1979feaeec47d91 to your computer and use it in GitHub Desktop.
Code.require_file "my_iex_helpers.exs"
import MyIExHelpers
λ iex
...
Error while evaluating: /Users/alco/tmp/.iex.exs
** (CompileError) .iex.exs:2: module MyIExHelpers is not loaded and could not be found
(elixir) src/elixir_exp.erl:123: :elixir_exp.expand/2
(stdlib) lists.erl:1352: :lists.mapfoldl/3
(stdlib) lists.erl:1353: :lists.mapfoldl/3
(elixir) src/elixir_exp.erl:49: :elixir_exp.expand/2
defmodule MyIExHelpers do
def s do :init.stop end
end
import MyIExHelpers
λ iex
...
Error while evaluating: /Users/alco/tmp/.iex.exs
** (CompileError) .iex.exs:5: module MyIExHelpers 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.
(elixir) src/elixir_exp.erl:123: :elixir_exp.expand/2
(stdlib) lists.erl:1352: :lists.mapfoldl/3
(stdlib) lists.erl:1353: :lists.mapfoldl/3
(elixir) src/elixir_exp.erl:49: :elixir_exp.expand/2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment