Time for a ride, ARM Haskellers

Aug. 1, 2015, 10:02 a.m.

Post-edit: This piece of blog was written with Son kite - Focus playing out loud ^^

OK, After drooling down to the most humble status again while discovering (for a year now) Haskell, I decided to make Haskell my very own first-class prototyping (if not development) language.

Believe me this is quite a challenge.

  • Because you want it on every machine
  • On every machine
  • Including my phone - Chinese Android ARM
  • Including my laptop - Chromebook, ARM, debian remastered
  • Including elder GuruPlug, SheevaPlug, and younger RaspberryPis
  • And all other AMD, Intel or whatsoever based electronic-enabled turing machines - PS3, you're next :)

So for the impatient and for the help of a few, here is the main clue

  • You will face "cabal hell" (tm) - avoid it soon, and embrace cabal sandbox
  • You will face ghci inexistence on ARM - well no soluce for that one (neither for TH), but hugs is a friend
  • Meanwhile you will face the horrible "getNumberOfProcessors" issue. If you don't read japanese, those links won't help you get up fast - here are the links FTR
  • So take a deep breadth and follow Alice (and Bobby) down the rabbit hole :

Installing haskell on ARM is not a piece of cake. The right way (as of 20150801) is to (1) Have cabal and ghc in any distributed format (2) use cabal only to upgrade itself, cf $ cabal install cabal cabal-install (3) correct the package by

-- sneaky bootstrapping
cabal unpack cabal-install

-- on line 166 of ./cabal-install-

End up with the usual

cabal install && ln -s ~/.cabal/bin/cabal ~/bin/cabal

And voila