This is driving e crazy. The following code works:
name = :bob
dump(:(module ($name) export bar; function bar() 3 end end))
@eval module ($name) export bar; function bar() 3 end end
println(bob.bar())
yet the "dump" appears identical to the malformed module in the earlier
code:
andrew@netbook:~/project/int-mod-n/src> julia foo.jl
OpenBLAS : Your OS does not support AVX instructions. OpenBLAS is using
Nehalem kernels as a fallback, which may give poorer performance.
Expr
head: Symbol module
args: Array(Any,(3,))
1: Bool true
2: Symbol bob
3: Expr
head: Symbol block
args: Array(Any,(6,))
1: Expr
head: Symbol =
args: Array(Any,(2,))
typ: Any
2: Expr
head: Symbol =
args: Array(Any,(2,))
typ: Any
3: LineNumberNode
line: Int64 4
4: Expr
head: Symbol export
args: Array(Any,(1,))
typ: Any
5: LineNumberNode
line: Int64 4
6: Expr
head: Symbol function
args: Array(Any,(2,))
typ: Any
typ: Any
typ: Any
3