Thanks! I need to get used to creating/manipulating Expr objects. 

Do you know if there's a more in-depth Julia metaprogramming guide out 
there? The manual just scratches the surface.

On Wednesday, 2 July 2014 23:21:33 UTC-5, Jameson wrote:
>
> macro modcreate(name)
>     Expr(:module, false, esc(name::Symbol), Expr(:begin))
> end
>
>
> On Thu, Jul 3, 2014 at 12:00 AM, Eric Davies <[email protected] 
> <javascript:>> wrote:
>
>> Hi all,
>>
>> I'm working on a multipass configuration file package and I'm having 
>> difficulty executing my ideas (I'm not great at the metaprogramming stuff 
>> yet). I want to create a baremodule in a macro and have it available to the 
>> scope containing the macro. I want to be able to pass the name of the 
>> baremodule as an argument to the macro. Unfortunately, every (probably 
>> terrible) strategy I try seems to give the error "name not defined" (where 
>> name is the argument to the macro containing the desired module name).
>>
>> I want it to work like this (toy example):
>>
>> julia> @modcreate foo
>>
>> julia> typeof(foo)
>> Module
>>
>> Can anyone suggest possible contents for the macro that might produce the 
>> above behaviour?
>>
>> Thanks,
>> Eric
>>
>
>

Reply via email to