title: F# Refer a module function from another file
body: <p>I am writing a very beginner's F# program (<strong>F# Core</strong> &amp; <strong>Visual Studio Code</strong>) as follows:</p>
  
  <p>1.Sort.fs</p>
  
  <pre><code>namespace Demo
  
  module Sort =
      let rec quickSort list =
          match list with
          | [] -&gt; []
          | head::tail -&gt;
              let smalls =
                  tail |&gt; List.filter(fun c-&gt; c&lt;head)|&gt; quickSort
              let bigs =
                  tail |&gt; List.filter(fun c-&gt; c&gt;=head)|&gt; quickSort
              List.concat [smalls;[head];bigs]        
  </code></pre>
  
  <p>2.Program.fs</p>
  
  <pre><code>namespace Demo
  
  open Sort
  
  module Program =
      let list = [3;1;8;4;9;5;7;6]
  
      [&lt;EntryPoint&gt;] 
      let main argv =
          list |&gt; Sort.quickSort |&gt; printfn "%A"       
          printfn "Hello World from F#!"
          0
  </code></pre>
  
  <p>However when I try to <code>open Sort</code> module into <code>Main</code> I am getting following errors:</p>
  
  <blockquote>
    <p>The namespace or module 'Sort' is not defined.</p>
    
    <p>The value, namespace, type or module 'Sort' is not defined. Maybe you want one of the following:
       sqrt</p>
  </blockquote>
  
  <p>Where as, if I take sort module under same file - `Program.fs, everything works fine. Is there anything else needed to refer file as well?</p>