21 Replies - 19585 Views - Last Post: 16 November 2012 - 09:30 AM

Haskell Information and Resources

Posted 09 December 2009 - 07:10 PM

I'm creating this topic to list some Haskell resources, give a little help getting started, and put you on the right path.

Installation:

The best way to install Haskell is via The Haskell Platform which you can download for various operating systems here. The Haskell Platform is a standard Haskell distribution for every system. You can find instructions for installing it on your system at the web page I linked. I'm not going to reiterate those instructions.

Editors:

There are plenty of ways to edit Haskell code. There is a great Vim plugin that you can find information about here.

There is also an Emacs major mode, which is what I use, and it works phenomenally, and I recommend it over everything else I'll mention here. You can find haskell-mode here.

There is an Eclipse plugin that is currently in development that you can find here. It will not be very useful unless you know Eclipse-foo and know how to build plugins and such.

There is a Haskell IDE written in Haskell that I can't vouch for, because I can't get the damn thing to compile on my system. I hear good things about it though, and there is a Windows installer available for it, so the Windows people should enjoy this. You can find Leksah here.

There is also the less common editors like Yi and such around, but this pretty much covers the most used editors. As I said before, I recommend Emacs over all of them, but I'm biased - I'm a Lisper.

The best book available for Haskell right now is real-world oriented, and is recommended for people who already know a language, and want to learn Haskell for real-world projects.[1] It's called Real World Haskell and you can read it online here. Of course, you can purchase it in Ebook and dead-tree form, but I just read it online because I'm poor.

There is a tutorial for less experienced users, and this tutorial might be a good thing to read before you read Real World Haskell, as it's extremely gentle and even kind of funny. It's called Learn You A Haskell or LYAH for short, and you can read it here. There is also a PDF here[2]. Note that it is incomplete, and doesn't yet go into advanced concepts. I recommend you get all you can from this tutorial and then read Real World Haskell.

There is a complete list of tutorials here, along with a complete list of books here.

GUI toolkits:

I would not be surprised if people thought that you couldn't code GUIs in Haskell. That is incorrect. There are several mature and useful Haskell GUI libraries, including bindings to GTK here, and WxWidgets that you can find information about here. WxHaskell is a series of packages on Hackage. While Gtk2hs isn't a hackage package, they do offer a Windows installer, binaries for several *nix flavors and a source package.

Besides Google, there are some resources you should know about when using Haskell.

The first, and most important, is Hoogle. It's a standard library search engine. You can put in a type signature, or a name, and it will find what you're looking for in the standard library. You can also use this from the command-line by cabal installing hoogle, and there is a command that you can use in the Emacs haskell-mode to use it there as well.

The second is the similar Hayoo. I believe this one also searches the packages on Hackage.

Speaking of Hackage, that's another amazingly useful resource. It's a place where most Haskell libraries are stored. There are Haskell libraries for virtually everything on Hackage. It's located here. The packages are indexed by category.

A good place to ask questions about Haskell is of course, right here on DiC. I'd use Haskell-Cafe or Stackoverflow.com for questions that nobody else can answer. Haskell-Cafe is a last-resort kind of thing for me.

And last but not least, there is a very nice Haskell cheatsheet that you can download after installing Haskell via the Haskell platform by typing 'cabal install cheatsheet' on a terminal.

For as long as I'm allowed to edit this topic, I'll include more stuff as I think of it. If you find any errors or think I should include something I haven't mentioned, please PM me.

1. OMG HASKELL CAN BE USED IN THE REAL WORLD WTF11!
2. Thanks to EdwinNameless for bringing that to my attention.

Re: Haskell Information and Resources

Will do. I actually stayed up pretty late last night trying out some basic Haskell. Still doesn't make sense, but I'm working on it

When you're first learning a functional language, you have to really sit down and study as if you have no idea what programming is. You have to learn to put yourself in the functional state of mind, and then everything becomes clear. The primary reason people end up not using Haskell, or hating Haskell and other functional languages, is because they don't put enough effort into understanding them, and end up thinking they don't need them. It's sad really. If something doesn't make sense, give me a ring and I'll try to explain it to you.

Re: Haskell Information and Resources

Posted 19 January 2010 - 12:54 PM

As an information and resources thread.. it would be great if you could write something about what Haskell and functional languages are. I have been programming for the majority of my lifetime, yet to be honest I have no idea what they are (I will google it, but it would be useful to others to have a description here!)

Re: Haskell Information and Resources

Posted 19 January 2010 - 02:10 PM

Shane Hudson, on 19 Jan, 2010 - 11:54 AM, said:

As an information and resources thread.. it would be great if you could write something about what Haskell and functional languages are. I have been programming for the majority of my lifetime, yet to be honest I have no idea what they are (I will google it, but it would be useful to others to have a description here!)

I agree. The problem here is that Functional Programming is a difficult topic to describe. When people ask me what Haskell or Clojure or Functional programming in general is, I typically direct them herehere and here. I think will suffice, and as I can't edit this topic, this post will have to do.