This is a fork of the GHC code base, in which we are working on an implementation of partial type signatures. Our proposed design is described in the paper Partial Type Signatures for Haskell (Practical Aspects of Declarative Languages 2014). This implementation is a work-in-progress.
To try out the modified compiler, you have to build it. GHC upstream build instructions are available at http://hackage.haskell.org/trac/ghc/wiki/Building and we recommend to follow them. Here is a summarised version that should work (with Linux-style commands):
-
Install required development tools like
hsc2hs
,happy
,gcc
, certain C development libraries,automake
,autoconf
, etc. See http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation. If you use Debian or Ubuntu Linux, you can use the commandsudo apt-get build-dep ghc6
.... # install all needed packages...
-
Clone the main GHC repository:
git clone git://git.haskell.org/ghc.git
-
Go to the directory where you have checked out the repository:
cd ghc
-
Check out (the correct versions of) sub-repositories (for Haskell libraries and tools):
./sync-all get
-
Add our fork as a git remote and fetch the code:
git remote add partial-sigs https://github.com/mrBliss/ghc-head.git git fetch partial-sigs
-
Check out our branch
git checkout partial-sigs
-
Build GHC. You can use for example
make -j4
instead ofmake
to speed up compilation on a multi-core computer.cp mk/build.mk.sample mk/build.mk sed -i 's/#BuildFlavour = quick$/BuildFlavour = quick/' mk/build.mk perl boot && ./configure make -j4
-
Play with the compiler. Be sure to look at the examples of partial type signatures in
Demo.hs
. To run the demo file, execute the following command from the base dir of your GHC checkout../inplace/bin/ghc-stage2 --interactive Demo.hs