Issues with Haskell environment on Windows platform
This is actually a mail meant for the Haskell mailing list, but unfortunately joining those lists these days seems like a very complicated manner, since I’m still waiting for approval to join them (they probably don’t like my name). So I’ll blurt things here, it will describe the trials and tribulations of a beginner with Haskell on Windows, and hopefully someone will point this rant in the right direction and at the right people (which I can’t unless they stop disliking my name).
I am getting started with Haskell, and I’m trying to install on my day to day machine, which is a Windows 7 desktop. So I made the first steps by installing the Haskell Platform for Windows.
Then I looked for an IDE for Haskell. Although I am a fan of CLI, I find Windows cmd.exe window horrid and counter productive. So I hear about leksah, and that the preferred way to install it (and, it seems, to install tons of other stuff) is to use cabal.
So I happily typed cabal install leksah, only to be prompted with the message: “no such package”. Obviously, this is a bug, since cabal could’ve seen easily that it has no data in the database, and perform ‘update’ for me, but let’s let things slide for a short while. So I run cabal update and I try again.
Then I get some random error (I am not used to reading which is an error message and which is not) regarding lack of some tools that I don’t have. And while some of you would point me, diligently, towards the installation guide, please bear in mind that I am a beginner, therefore prone to not understanding documentation very well. And since I reuse knowledge from the other tools I use, I think that obviously, any package manager would automatically resolve dependencies for the missing packages, right? Wrong. There are no dependencies for the tools required in cabal packages, like they float over the water, and expect a working environment there. And I obviously have one, since I am telling you about my first (ok, ok, second) error I encounter.
I let things slide a bit more and perform cabal install gtk2hs-buildtools which absolutely makes no sense whatsoever. But I do it, and they I run cabal install leksah. Success?
No success whatsoever. It complains that glib lacks pkg-config, a tool that I know and I understand what could be used for; but there’s no way I could go on from here. pkg-config? Why?
And stackoverflow considers I’m an idiot, and tells me that I should perform some voodoo tricks that make no sense on my machine. And I’m therefore very very upset.
Surely, I could install leksah from the .exe file that I find on the website. If I choose the right one, of course, because there’s 4 (four) of them. And then, you have all these packages that need to be installed using cabal. And if you manage to find the right package, install it, the first image of leksah is: “where are your packages?”
And the answer is: “I have no friggin’ clue. There was nothing in this that asked me for package installation”.
You can see now how voodoo everything feels for a zero-day Haskell user on Windows. I have no idea why pkg-config is missing, but more importantly, I should NOT care. I have no idea why I need
gtk2hs-buildtools, and again, I should NOT care, since that’s what we use cabal for, right? And it should be obvious for anyone that installs Haskell Platform and all the things from scratch, because there’s no way you can avoid this. Not on my machines, at least.
Remember, this might be very well the first contact that the next Windows programmer has with Haskell. I guess it’s an important thing, and please, if you can, while proving that I’m an idiot, help me understand what have I done wrong, and why don’t things work.
PS: Initial post title was “Haskell Platform for Windows is crippled”, however, it was pointed out that everything works just fine, except for the IDE installation, which is correct. I changed the title (I didn’t modify the slug, tho’), unfortunately, even this new title is slightly incorrect.