Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Matthew Dempsky <matthew <at> dempsky.org>
Subject: Patch to allow parameterized modules in parse transforms
Newsgroups: gmane.comp.lang.erlang.patches
Date: Monday 19th November 2007 22:29:54 UTC (over 9 years ago)
The Erlang compiler does not currently allow parameterized modules to
be used for parse transforms, but only because of a bad atom_to_list
call.  I replaced this with io_lib:format and it seems to work.

--- compile.erl~	2007-10-31 07:05:39.000000000 -0700
+++ compile.erl	2007-11-19 14:12:43.000000000 -0800
@@ -765,7 +765,7 @@
     end.

 foldl_transform(St, [T|Ts]) ->
-    Name = "transform " ++ atom_to_list(T),
+    Name = lists:flatten(io_lib:format("transform ~p", [T])),
     Fun = fun(S) -> T:parse_transform(S#compile.code, S#compile.options)
end,
     Run = case member(time, St#compile.options) of
 	      true  -> fun run_tc/2;
_______________________________________________
erlang-patches mailing list
erlang-patches@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-patches
 
CD: 4ms