title: Haskell : loading ALL files in current directory path
body: <p>The command (in GHCi)</p>
  
  <pre><code>:load abc
  </code></pre>
  
  <p>Loads the functions in the file abc (which must exist in the current directory path). How would I load all the files in the current directory path? Thanks</p>
  
  <h2>----------------------------------------------------------------------------------</h2>
  
  <p>[RESPONSE TO POST BELOW]</p>
  
  <p>Hi Rotskoff, thanks I tried your suggestion but I could not get it to work, so I think I must have misunderstood something.</p>
  
  <p>I created 3 files test.hs, test1.hs, and test2.hs as follows : </p>
  
  <p>-></p>
  
  <pre><code>--test.hs
  import NecessaryModule
  </code></pre>
  
  <p>-></p>
  
  <pre><code>--test1.hs
  module NecessaryModule where
  
  addNumber1 :: Int -&gt; Int -&gt; Int
  addNumber1 a b = a + b
  </code></pre>
  
  <p>-></p>
  
  <pre><code>--test2.hs
  module NecessaryModule where
  
  addNumber2 :: Int -&gt; Int -&gt; Int
  addNumber2 a b = a + b
  </code></pre>
  
  <p>Then when I did : </p>
  
  <pre><code>:load test
  </code></pre>
  
  <p>I got the error message : </p>
  
  <pre><code>test.hs:1:8:
      Could not find module `NecessaryModule':
        Use -v to see a list of the files searched for.
  </code></pre>
  
  <p>Thanks</p>
  
  <h2>---------------------------------------------------------------------------------</h2>
  
  <p>Thanks. This is what I did to get it to work (following Rotskoff's suggestion) : </p>
  
  <p>-></p>
  
  <pre><code>--test.hs
  import NecessaryModule1
  import NecessaryModule2
  </code></pre>
  
  <p>-></p>
  
  <pre><code>--NecessaryModule1.hs
  addNumber1 :: Int -&gt; Int -&gt; Int
  addNumber1 a b = a + b
  </code></pre>
  
  <p>-></p>
  
  <pre><code>--NecessaryModule2.hs
  addNumber2 :: Int -&gt; Int -&gt; Int 
  addNumber2 a b = a + b
  </code></pre>