Hi fellows,

Question 1:

I am trying to generate a type  in a macro and expect to see it in the 
calling context.
this is what i am doing in the macro:
code = quote eval(parse(string("type ", $(priv_typname), " end"))) end

here is what is returned from the macro
eval(parse(string("type ",$(Expr(:escape, "priv_Eq"))," end")))

but in the julia shell, when i try to do this :

julia> a = priv_Eq()
ERROR: UndefVarError: priv_Eq not defined

can somebody tell me why and what I am doing wrong?


Question 2:

I am also trying to generate a parametrized type like:

type Eq{T,S}
end

any suggestions to append the type_params to the type programmatically?

Thanks





Reply via email to