[erlang-questions] compile transforms which change the module name

Peter Andersson peppe@REDACTED
Fri Jul 10 11:02:53 CEST 2009


The  'no_error_module_mismatch' option should do the trick:

-module(foo).
-compile({parse_transform,rename}).
...

1> compile:file(foo, [no_error_module_mismatch]).
{ok,xyz}

  /Peppe


Joe Armstrong wrote:
> If I change the module name in a compile transform I get an error.
>
> If there a work-around for this?
>
> I really want to change the module name so that when I compile foo.erl it
> produces a new name xyz.beam containing code for the module xyz.
>
> /Joe
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
>   



More information about the erlang-questions mailing list