Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Elixir macro to alias Elixir module names in Erlang
tag: 0.0.1
Failed to load latest commit information.
lib Syntax improvement
test Syntax improvement
.gitignore Initial code import Syntax improvement
mix.exs Initial code import
package.exs Add expm package.exs


Elixir macro to alias Elixir module names in Erlang:

defmodule :some_module_transform do
  use ExErl.ParseTransform

  transform :some_module, to: SomeModule

This will generate an Erlang module called some_module_transform which can be used to compile Erlang programs like this:

-compile({parse_transform, some_module_transform}).

%% ...

myfun() ->

some_module_transform will rewrite some_module to SomeModule.

Be informed, though, that this is a fairly dangerous technique at the moment as it will rewrite pretty much every occurence of some_module atom in your Erlang module, which may sometimes lead to some undesirable effects.

Something went wrong with that request. Please try again.