The topic will be functional programming with emphasis on Haskell. I'm also writing my own language called Mikan and hope to share progress here. So let's have fun!

Wednesday, February 2, 2011

Homebrew for Haskell!

It's now quite easy to get Haskell and LLVM to install and play together on Mac OS X! Following some of the advise from here, you first need to remove your existing Haskell Platform and packages:

> sudo /Library/Frameworks/GHC.framework/Tools/Uninstaller
> rm -rdf ~/.ghc
> rm -rdf ~/.cabal

If you don't already have Homebrew installed, go ahead and do that.

Now for the fun! (Although pour yourself a cup of coffee as this takes a while...)

> brew install llvm --universal

Note that the "--universal" option is critical! If you don't specify this, the LLVM Haskell library will not build. Note: you may also wish to specify "--with-clang" if you'd like to simultaneously build clang as well.

> brew install haskell-platform

> cabal update

> cabal install llvm

> ghci

Prelude> :m LLVM.Core
Prelude LLVM.Core>

Viola!

0 comments:

Post a Comment

About Me

My Photo
A comic artist, sometimes programmer, and engineer in the field of renewable energy.

Tags

© 2009, 2010 Michael Patrick O'Keefe, all rights reserved

Interesting Shtuff

Followers