Personal tools

Windows

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(Changed description of wxHaskell; added link to Win32 package; added winerror; updated several links)
(Added section "Tools for compilation"; updated the link for WinHugs)
Line 16: Line 16:
 
* [[WinHugs]]
 
* [[WinHugs]]
 
* GHC : Special notes for Cygwin users - [http://www.haskell.org/ghc/docs/6.6/html/building/platforms.html] [http://www.haskell.org/ghc/docs/latest/html/users_guide/ghci-cygwin.html]
 
* GHC : Special notes for Cygwin users - [http://www.haskell.org/ghc/docs/6.6/html/building/platforms.html] [http://www.haskell.org/ghc/docs/latest/html/users_guide/ghci-cygwin.html]
  +
  +
== Tools for compilation ==
  +
* As some of the packages contain Unix/Linux specific scripts/commands, you need [http://www.mingw.org/ MingW] and [http://www.mingw.org/wiki/msys MSYS] to simulate a Unix environment. In some cases you need [http://www.cygwin.com/ Cygwin] instead.
  +
  +
* If you need to link to C-software, define an environment variable C_INCLUDE_PATH that lists the directories where the header files can be found. For linking the libraries you need to define an environment variable LIBRARY_PATH as well, listing the directories where .a and .lib files can be found.
  +
  +
* Packages are often delivered as a .tar or .tar.gz file, see [[How to unpack a tar file in windows]]
  +
  +
* Source files from Unix(-like) systems have lines terminated with Line Feed only; to convert them to MS-DOS format (as needed by Windows), use the <code>unix2dos</code> (included in MSYS). For more information, give command: <code>unix2dos --help</code>
  +
  +
* To convert a set of files to MS-DOS format (note: this might damage binary files):
  +
::<code>C:\MSYS\1.0\bin\find . -type f -exec unix2dos {} ;</code>
  +
:Note: the <code>find</code> command included in MSYS is different from the MS-DOS <code>find</code> command, therefore, you need to specify the entire path to this command.
  +
   
 
== Libraries ==
 
== Libraries ==
   
 
* GUI : [[wxHaskell]] - A binding of wxWidgets (formerly known as wxWindows) in Haskell. Note, see also [[wxHaskell/Building]]
 
* GUI : [[wxHaskell]] - A binding of wxWidgets (formerly known as wxWindows) in Haskell. Note, see also [[wxHaskell/Building]]
  +
 
* GUI : [[Gtk2Hs]] - A binding of GTK in Haskell. Note this requires installing [http://www.gtk.org GTK] on windows.
 
* GUI : [[Gtk2Hs]] - A binding of GTK in Haskell. Note this requires installing [http://www.gtk.org GTK] on windows.
  +
 
* [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Win32 Win32] - low levelish bindings to Windows API. Comes with ghc and non-minimal hugs distribution. [http://darcs.haskell.org/ Win32 darcs repo]
 
* [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Win32 Win32] - low levelish bindings to Windows API. Comes with ghc and non-minimal hugs distribution. [http://darcs.haskell.org/ Win32 darcs repo]
  +
 
* [[HDBC-ODBC under Windows]] for database access.
 
* [[HDBC-ODBC under Windows]] for database access.
  +
 
* [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/winerror winerror]: Error handling for foreign calls to the Windows API
 
* [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/winerror winerror]: Error handling for foreign calls to the Windows API
   
 
== Special tips and tricks for Windows ==
 
== Special tips and tricks for Windows ==
   
* darcs : http://wiki.darcs.net/index.html/WindowsConfiguration (although darcs send seems to be broken for now [2006-08-30])
+
* darcs : http://wiki.darcs.net/index.html/WindowsConfiguration
  +
 
* Make sure your Haskell compiler (e.g. GHC) and tools are on your system path: http://www.computerhope.com/issues/ch000549.htm
 
* Make sure your Haskell compiler (e.g. GHC) and tools are on your system path: http://www.computerhope.com/issues/ch000549.htm
  +
 
* GHCi: Using GHCi from a DOS box sucks. Using it from withing shell mode in Emacs sucks a lot less - do 'M-x shell' in emacs, then type 'ghci'.
 
* GHCi: Using GHCi from a DOS box sucks. Using it from withing shell mode in Emacs sucks a lot less - do 'M-x shell' in emacs, then type 'ghci'.
* GHCi on cygwin: When running GHC under a Cygwin shell on Windows, Ctrl-C sometimes doesn't work. A workaround is to use the rlwrap program to invoke ghci : In addition to proper Ctrl-C, you also get emacs (or vi) key bindings and command history across sessions, which saves you a load of typing.
+
  +
* GHCi on Cygwin: When running GHC under a Cygwin shell on Windows, Ctrl-C sometimes doesn't work. A workaround is to use the rlwrap program to invoke ghci : In addition to proper Ctrl-C, you also get emacs (or vi) key bindings and command history across sessions, which saves you a load of typing.
  +
  +
* If a package depends (either directly or indirectly) on the <code>unix</code> package, you cannot compile it on Windows
  +
   
 
== Direct downloads ==
 
== Direct downloads ==
   
 
=== Haskell ===
 
=== Haskell ===
  +
  +
Below a list of binary packages packages for Windows. To be sure you get the last version of each, it is best to download the source from [http://hackage.haskell.org/packages/archive/pkg-list.html Hackage] and compile.
   
 
[http://www.haskell.org/alex/dist/alex-2.0.1-win32.zip Alex 2.0.1] (obsolete) [http://www.haskell.org/haskellwiki/Alex (website)] ;
 
[http://www.haskell.org/alex/dist/alex-2.0.1-win32.zip Alex 2.0.1] (obsolete) [http://www.haskell.org/haskellwiki/Alex (website)] ;
Line 50: Line 71:
 
[ftp://ftp.cs.york.ac.uk/pub/haskell/contrib/hscolour-1.9.zip HsColour 1.9] [http://www.cs.york.ac.uk/fp/darcs/hscolour/ (website)] ;
 
[ftp://ftp.cs.york.ac.uk/pub/haskell/contrib/hscolour-1.9.zip HsColour 1.9] [http://www.cs.york.ac.uk/fp/darcs/hscolour/ (website)] ;
 
[http://haskell.org/hoogle/other/lambdashell-0.3.zip Lambda Shell 0.3] (obsolete) [http://www.cs.princeton.edu/~rdockins/lambda/home (website)] ;
 
[http://haskell.org/hoogle/other/lambdashell-0.3.zip Lambda Shell 0.3] (obsolete) [http://www.cs.princeton.edu/~rdockins/lambda/home (website)] ;
[http://cvs.haskell.org/Hugs/downloads/2006-05/WinHugs-May2006.exe WinHugs May 2006] [http://www.haskell.org/hugs/ (website)] ;
+
[http://cvs.haskell.org/Hugs/downloads/2006-09/WinHugs-Sep2006.exe WinHugs September 2006] [http://www.haskell.org/hugs/ (website)] ;
   
   

Revision as of 19:39, 18 March 2009

GHC is well supported on Windows.


Contents

1 Editors

2 Compilers

3 Tools for compilation

  • As some of the packages contain Unix/Linux specific scripts/commands, you need MingW and MSYS to simulate a Unix environment. In some cases you need Cygwin instead.
  • If you need to link to C-software, define an environment variable C_INCLUDE_PATH that lists the directories where the header files can be found. For linking the libraries you need to define an environment variable LIBRARY_PATH as well, listing the directories where .a and .lib files can be found.
  • Source files from Unix(-like) systems have lines terminated with Line Feed only; to convert them to MS-DOS format (as needed by Windows), use the unix2dos (included in MSYS). For more information, give command: unix2dos --help
  • To convert a set of files to MS-DOS format (note: this might damage binary files):
C:\MSYS\1.0\bin\find . -type f -exec unix2dos {} ;
Note: the find command included in MSYS is different from the MS-DOS find command, therefore, you need to specify the entire path to this command.


4 Libraries

  • GUI : Gtk2Hs - A binding of GTK in Haskell. Note this requires installing GTK on windows.
  • Win32 - low levelish bindings to Windows API. Comes with ghc and non-minimal hugs distribution. Win32 darcs repo
  • winerror: Error handling for foreign calls to the Windows API

5 Special tips and tricks for Windows

  • GHCi: Using GHCi from a DOS box sucks. Using it from withing shell mode in Emacs sucks a lot less - do 'M-x shell' in emacs, then type 'ghci'.
  • GHCi on Cygwin: When running GHC under a Cygwin shell on Windows, Ctrl-C sometimes doesn't work. A workaround is to use the rlwrap program to invoke ghci : In addition to proper Ctrl-C, you also get emacs (or vi) key bindings and command history across sessions, which saves you a load of typing.
  • If a package depends (either directly or indirectly) on the unix package, you cannot compile it on Windows


6 Direct downloads

6.1 Haskell

Below a list of binary packages packages for Windows. To be sure you get the last version of each, it is best to download the source from Hackage and compile.

Alex 2.0.1 (obsolete) (website) ; Cpphs 1.2 (obsolete) (website) ; Darcs 2.2.1 for Windows without Cygwin ; Darcs 2.2.0 for Windows without Cygwin, with SSH support files ; Darcs 2.2.0 for Windows with Cygwin (website) ; Drift (website) ; GHC 6.10.1 (website) ; Haddock 0.7 (obsolete) (website) ; Hat July 2006 (website) ; Happy 1.13 (obsolete) (website) ; Hoogle June 2006 (obsolete) (website) ; HsColour 1.9 (website) ; Lambda Shell 0.3 (obsolete) (website) ; WinHugs September 2006 (website) ;


6.2 Development

CVS 1.11.22 (website)  ; Python 2.4.3 (website)  ; Scons 0.96.1 (website)  ; SVN 1.3.2 (website)  ; TextPad 4.7.3 (website)  ; Unix Utils 14-04-03 (website)  ;