title: Cabal: build dir with source
body: <p>I have a <code>src</code> directory. In this directory I have <code>Main.hs</code> file and <code>Test</code> directory. In the <code>Test</code> directory I have <code>Test.hs</code> module. I need to compile it with cabal.</p>
  
  <p>In my cabal file I have:</p>
  
  <pre><code>Executable main
    -- .hs or .lhs file containing the Main module.
        Main-is: src/Main.hs  
  </code></pre>
  
  <p>and</p>
  
  <pre><code>  -- Modules not exported by this package.
       Other-modules: Test.Test
  </code></pre>
  
  <p>When I do <code>cabal configure</code> it's OK, but when I try to <code>cabal build</code> I get the following error:</p>
  
  <pre><code>cabal build
  Preprocessing executables for main-0.0.1...
  cabal: can't find source for Test/Test in ., dist/build/autogen
  </code></pre>
  
  <p>How can I correctly build <code>Main.hs</code> and some other directories with <code>.hs</code> files?</p>
  
  <p>Thank you.</p>