title: MethodError: `convert` when using types defined in modules in separate files
body: <p>This question concerns using types, and vectors of types. I get <code>MethodError: convert</code> when I have two files, <code>Foo.jl</code> and <code>Baz.jl</code>, which contain one module each, and each module contains one type.</p>
  
  <ol>
  <li><p>The contents of <code>Foo.jl</code>:</p>
  
  <pre><code>module FooModule
  type Foo
    bar::Int
  end
  end
  </code></pre></li>
  <li><p>The contents of <code>Baz.jl</code>:</p>
  
  <pre><code>module BazModule
  include("Foo.jl")
  type Baz
    qux::Vector{FooModule.Foo}
  end
  end
  </code></pre></li>
  </ol>
  
  <p>Type <code>Foo</code> contains an <code>Int</code>, and type <code>Baz</code> contains a <code>Vector</code> of <code>Foo</code>.</p>
  
  <p>To get the error I open a Julia 0.4.7-pre+3 REPL where these files are stored and type</p>
  
  <pre><code>include("Foo.jl")
  include("Baz.jl")
  foo1 = FooModule.Foo(1)
  baz1 = BazModule.Baz([foo1])
  </code></pre>
  
  <p>where the 4th command gives this error:</p>
  
  <pre><code>ERROR: MethodError: `convert` has no method matching convert(::Type{BazModule.FooModule.Foo}, ::FooModule.Foo)
  This may have arisen from a call to the constructor BazModule.FooModule.Foo(...),
  since type constructors fall back to convert methods.
  Closest candidates are:
    BazModule.FooModule.Foo(::Any)
    call{T}(::Type{T}, ::Any)
    convert{T}(::Type{T}, ::T)
    ...
   in copy! at abstractarray.jl:310
   in call at /Users/james/Documents/code/julia/julia/Baz.jl:5
  </code></pre>
  
  <p>There seems to be an error due to the difference between the <code>FooModule</code> associated with the <code>include</code> statement in <code>BazModule</code>, and the <code>FooModule</code> in <code>Foo.jl</code> itself.</p>
  
  <p>What is(are) the error(s) in my code, and how I should change my style to remove the error(s)?</p>