title: How do you get GHC to output compile errors to a file instead of standard output?
body: <p>I'm trying to compile a haskell file that has a HUGE number of errors in it.  I want to start debugging the first one but unfortunately there are so many that they go off the screen.</p>
  
  <p>I want to pipe the error messages to a file so that I can read from the top, but normal methods don't seem to work.</p>
  
  <p>I've tried:</p>
  
  <pre><code>ghc File.hs &gt; errors.log
  ghc File.hs &gt;&gt; errors.log
  ghc File.hs | more
  </code></pre>
  
  <p>None of them work.  Using <code>&gt;</code> and <code>&gt;&gt;</code> only writes the first couple of lines to the file and then the rest to standard output.  Using <code>more</code>, <code>less</code>, <code>cat</code> etc doesn't make any difference at all.</p>
  
  <p>Is there a flag for GHC that will let me output to a file?</p>
  
  <p>(I should probably let you know that I'm working on a Windows machine with Cygwin.)</p>