Haskell is one of powerful functional programming language. More specific, it is a polymorphically statically typed, lazy, purely functional language. It is the good language for expressing math equation and logic naturally. Haskell is based on the lambda calculus, thus it use lambda as the logo.
Haskell can be installed on various operating system, from Linux, Windows, Mac OS. Most of them are Operating System for Personal Computer (PC). Now, can we install Haskell to different platform? ARM maybe? Yes it can.
In this article we will discuss about how to install Haskell on top of Raspberry Pi device. Specifically, the Raspberry Pi device which running Linux OS. The device I use as test is Raspberry Pi model B with 512MB RAM.
Make sure you have a good preparation. You have downloaded Raspberry Pi’s OS images and write to your SD card. Therefore, I assume you have install Linux operating system on your Raspberry Pi.
There is no special treatment for installation. I assume you have a ready to play Pi with network support.
You can either use SSH or connect some peripheral (keyboard, mouse, display) to access Pi. We won’t cover much detail here.
There are two package we will discuss on this article: ghc and haskell-platform.
GHC or Glasgow Haskell Compiler, is a package with compiler, and interactive interpreter for Haskell.
Haskell-platform is a platform, has a collection of haskell code and tools for developing Haskell application.
on Raspbian Wheezy
The raspbian I use here is 2013-07-26. To install Haskell on Raspbian, use:
# make sure you have root privilege to install sudo apt-get install ghc haskell-platform
If you take it correctly, you has already install Haskell. It should be no problem at this point.
The real problem might occur here. The ghc used on Raspbian (per September 5th, 2013) are version 7.4.1 and according to Haskell official site ghci or the interpreter cannot be used for version lower than 7.4.2 on ARM based device.embedded, haskell, rpi