export it?
julia> module B; export MyInt; typealias MyInt Int; end
> B
> julia> module A; using B; println("I can see $MyInt"); end
> I can see Int64
> A
On Thu, Sep 17, 2015 at 8:26 AM, Ján Dolinský <[email protected]>
wrote:
> Hi,
>
> Is it possible to share a user defined type alias among two or more
> modules ?
>
> E.g. I define the following typealias in a moduleA as follows:
> if haskey(ENV, "USE_FLOAT32") && ENV["USE_FLOAT32"] == "1"
> typealias UserFloat Float32
> else
> typealias UserFloat Float64
> end
>
> I would like moduleB to know what "UserFloat" defined in moduleA means.
>
> Can I do in moduleB e.g.
>
> module moduleB
>
> using moduleA
> moduleA.UserFloat
>
> end
>
> Thanks,
> Jan
>