public
Description: Reia is a Ruby/Python-like language for BEAM, the Erlang VM
Homepage: http://reia-lang.org
Clone URL: git://github.com/tarcieri/reia.git
Build modules at runtime using Smerl
Tony Arcieri (author)
Tue Aug 05 00:28:15 -0700 2008
commit  f8d3e0cb57186ca839f45e7b5f4c2db0db377fe9
tree    098bf41e78707be016327bcd3a8289027148aa56
parent  c51a7bab2091b457b5274d20795234e2b3854f7e
...
8
9
10
11
12
13
 
 
 
 
 
 
 
 
 
14
...
8
9
10
 
 
11
12
13
14
15
16
17
18
19
20
21
0
@@ -8,5 +8,12 @@
0
 -module(reia_module).
0
 -export([build/1]).
0
 
0
-build(Module) ->
0
- io:format("w00t, module: ~p~n", [Module]).
0
\ No newline at end of file
0
+build({module, _Line, Name, Functions}) ->
0
+ {ok, Module} = lists:foldl(
0
+ fun(Func, Mod) -> smerl:add_func(Mod, Func) end,
0
+ smerl:set_export_all(smerl:new(Name), true),
0
+ Functions
0
+ ),
0
+ smerl:compile(Module);
0
+build(_) ->
0
+ {error, "invalid module"}.
0
\ No newline at end of file

Comments

    No one has commented yet.