[Haskell wikibook] Guide for Portable Haskell on windows

Devil may Cry cryofdevil at gmail.com
Thu Jul 5 22:06:42 CEST 2012



I have started learning Haskell for second time :)
First was attempt was failure.

I have simple guide how to create portable Haskell for Windows:


1. Download Haskell Platform  from  http://hackage.haskell.org/platform/
runas admin and select "just extract files" in Haskell dir

2. make Haskell\hs.bat ->
----------------------------
@ECHO OFF
rem %~dp0 survives runas admin,  %CD% doesn't
rem %~d0 current drive

rem No spaces in Path!
SET
Path=%Path%;%~dp0;%~dp0bin;%~dp0lib;%~dp0lib\extralibs\bin;%~dp0mingw\bin;%~dp0code;C:\Users\%USERNAME%\AppData\Roaming\cabal\bin


CMD /k "cd %~dp0MyCode"
----------------------------

MyCode is folder in Haskell dir.
Content between --- should be written in hs.bat


3. start hs.bat and type:
path    // check paths
ghci    // check interpreter
Prelude>  :?



Test it for yourself and put it in a book if you think it will do some good.




More information about the Wikibook mailing list