moodmosaic (Nikos Baxevanis)
Blog - About - Open Source - Bookmarks - Tags

Setting up Haskell on Windows

Wednesday, 15 April 2015

Why do that and not use Haskell Platform instead?

From what I have experienced so far, Haskell Platform falls behind the latest GHC release, and ships with Packages that one might not need.

Essentially there are two things needed:

GHC

Cabal

And that’s it!

Did it work out?

Open a command prompt (cmd.exe) window or a Git Bash window and execute:

$ which ghc
/c/ghc-x.y.z-x86_64-unknown-mingw32/ghc-x.y.z/bin/ghc

$ which cabal
/c/cabal-install-x.y.z-x86_64-unknown-mingw32/cabal

In the same command prompt executing ghci should launch GHCi (Haskell’s interactive environment):

GHCi, version x.y.z: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
>

To get the > character show up in the prompt, add the following to C:\Users\[YOUR USERNAME]\AppData\Roaming\ghc\ghci.conf:

:set prompt "> "

That’s it – Happy Haskell Programming (on Windows)!

━━━

This post has been filed under #haskell

Feedback

Have feedback on this page? Let @nikosbaxevanis know on twitter. Need help or found a bug? Contact me.


© 2011-2018 Nikos Baxevanis. All written content on this site is provided under a Creative Commons ShareAlike license. All code is provided under a MIT license unless otherwise stated.