title: Compiling Haskell code in Cygwin, and some other bugs in Haskell Platform on Windows
body: <p>I am trying to compile a simple hello world program in Haskell, with Haskell Platform 2011.2.0.1. If I load the code in WinGHCi, and use the GUI to compile, the .exe is created. Then I can run the .exe from Cygwin.</p>
  
  <p>But if I try to compile the code in Cygwin (using <code>ghc --make</code>), linker fails. But again, if I compile from the Windows <code>cmd</code> prompt, then the compile+linker works fine.</p>
  
  <p>Are there any other environment variables I need to import into Cygwin, to make the compile+linker work in it? I have put the following dirs in my Cygwin PATH: <code>2011.2.0.1/lib/extralibs/bin</code>, <code>2011.2.0.1/bin</code> (these are the only two valid Haskell related entries that I could see in the Windows environment variables).</p>
  
  <p>I also noticed a couple of invalid items in the Windows environment variables (this looks like a bug in the Haskell installation):</p>
  
  <ol>
  <li>(system var) <code>C/ProgramFiles/Haskell/bin</code> - this dir does not exist because I have installed Haskell in D disk.</li>
  <li>(user var) <code>userxxx/ApplicationData/cabal/bin</code> - this dir does not exist.</li>
  </ol>
  
  <p>I tried to file a bug report in HaskellPlatform, but I dont have permission to do it.</p>