How can I try GHC 7.8-RC1 with projects requiring libraries?

I downloaded the binary distribution for GHC 7.8-RC1. It did a good job of installing individual ghc / ghci / ghc-pkg files for 7.6 and 7.8. I can run ghci and do wonderful things, and I can compile simple hello world files, but if I try to do everything that uses any libraries, etc., it will not find them (not surprisingly).

I have done several searches, and it does not seem obvious how I will mess with larger projects compiled from 7.8, and even more strange, I do not find others asking this question. Maybe I missed something obvious? I am a Haskell noob, but there are some things that require 7.8 that I really want to experiment with.

I am running OS X Mavericks with Xcode 5, which, as I understand it, causes some problems, but so far I have been working on installing gcc 4.8 and referring to it as needed.

+3
source share
1 answer

I think if you just install your own PATHfor collecting ghc78 binaries, you can just use cabal(from an existing Haskell Platform installation.)

cabal already separates packages from the ghc version, so it will not use packages created with earlier versions of ghc.

For iOS, see this post for building ghc rc1:

http://www.haskell.org/pipermail/ghc-devs/2014-February/004004.html

Here is what works for me. I use Lion, but the same process should work under Mavericks.

cd /tmp
wget http://www.haskell.org/ghc/dist/7.8.1-rc1/ghc-7.8.20140130-x86_64-apple-darwin-lion.tar.bz2
tar jxf ghc-7.8.20140130-x86_64-apple-darwin-lion.tar.bz2
cd ghc-7.8.20140130
mkdir $HOME/ghc78
./configure --prefix=$HOME/ghc78
make install

export PATH="$HOME/ghc78:$PATH"
cabal update
cabal install dimensional-tf-0.3

(. )

$ ghci -XNegativeLiterals
GHCi, version 7.8.20140130: http://www.haskell.org/ghc/  :? for help
Prelude> import Numeric.Units.Dimensional.TF.Prelude
...> -123.56 *~ kilo meter
Loading ...
...
Loading package numtype-tf-0.1.2 ... linking ... done.
Loading package dimensional-tf-0.3 ... linking ... done.
-123560.0 m
+2

All Articles