You will need tools from six different sources, so have some patience to install them all. The good news is that you may find the tools useful in different situations as well.
To install Cygwin, go to the Cygwin website and download the small (250k) installation program. During installation it asks for:
to test whether it works:
make --version |
Download Tortoise SVN here and install it.
to test whether it works:
Download and install it as follows:
Download and install it as follows:
Open the file explorer, and rightclick any directory.
A context menu Tortoise SVN should be present.
3. GHC: Haskell compiler
The Glasgow Haskell Compiler (GHC) is an industrial-strength Haskell compiler,
including many libraries.
To install it:
to test whether it works:
A binary for your operating system is probably available.
For Windows, choose the standalone version.
It is wise to install the compiler in a directory without spaces in its name, for example d:\ghc.
Compile it with ghc Test.hs and run it by starting main.exe.
square x = x*x
main = putStrLn (show (square 5))
you should compile it by ghc --make Test.hs
module Test where
square x = x*x
main = putStrLn (show (square 5))
4. UUlib: Additional Haskell libraries from Utrecht University
Haskell comes with a large number of libraries,
but of course we like our own better.
Download and install them as follows:
autoconf
./configure
ghc --make Setup.hs -o setup -package Cabal
./setup configure
./setup build
./setup install
5. UU-AGC: Attribute Grammar Compiler
The Attribute Grammar Compiler is a preprocessor to Haskell that generates
recursive tree walks. Input to this preprocessor is a custom description of an attribute grammar.
autoconf
./configure
make build
make install
6. EHC: Extensible Haskell Compiler
Now you are ready to get our Extensible Haskell Compiler, and soon you'll be extending it yourself.
Note that there are various versions of the compiler, which correspond to various stages of extension.
In the example above, we build version 8 of the compiler, which is a good start because it is the
simplest version that has code generation.
to test whether it works:
Expect 30 Megabytes to be downloaded.
(The paths may look strange having colons and forward slashes, but this needs really be like this.
Of course, you can adapt the paths if you installed the tools elsewhere).
./configure --with-ghc=d:/ghc/ghc-6.8/bin/ghc.exe --with-gcc=d:/cygwin/bin/gcc
./configure --with-ghc=c:/ghc/ghc-6.8.2/bin/ghc.exe --with-gcc=/bin/gcc --with-cpp=/bin/cpp --with-ehc-unixtool-prefix="c:/cygwin" --with-uuagc-ehc-ast-options="" --with-uuagc-ehc-sem-options="" --with-gcc-ehc-options=""
make 8/ehc
Then wait a long time (7 minutes), as not only the compiler has to be build, but also the supporting development tools
shuffle and ruler.
Type the following commands:
cd testgrinc
../bin/8/ehc.exe -cexe sum.hs
sum.exe
|