Compiling Haskell code in Cygwin and some other bugs in the Haskell platform on Windows

I am trying to compose a simple hello program in Haskell with Haskell Platform 2011.2.0.1. If I load the code into WinGHCi and use the GUI to compile, .exe is created. Then I can run .exe from Cygwin.

But if I try to compile the code in Cygwin (using ghc --make), the linker will fail. But then again, if I compile from the Windows prompt cmd, then the compiler + linker works fine.

Are there any other environment variables that I need to import into Cygwin in order to get the compiler + linker to work in it? In my Cygwin PATH I put the following directories: 2011.2.0.1/lib/extralibs/bin, 2011.2.0.1/bin(these are the only two valid Haskell records that I could see in the Windows environment variables).

I also noticed a couple of invalid elements in Windows environment variables (this seems like an error in installing Haskell):

  • (system var) C/ProgramFiles/Haskell/bin- this directory does not exist, because I installed Haskell in the D-disk.
  • (user var) userxxx/ApplicationData/cabal/bin- this directory does not exist.

I tried to write an error report to HaskellPlatform, but I do not have permission to do this.

+5
source share
1 answer

, , , , PATH.

GHC Windows gcc ( C) ld linker. Cygwin, , MinGW, gcc ld. , , PATH /usr/bin Haskell Platform, ghc MinGW C , , GHC.

, HP Cygwin. :

$ echo $PATH
/bin:/usr/bin:.../2011.2.0.1/bin

:

$ echo $PATH
.../2011.2.0.1/bin:/bin:/usr/bin

, , .

+3

All Articles