What are some resources for learning to write a major mode for a programming language such as Haskell? I know such things exist but I would like to learn how to do it, it seems like a fun and interesting project.
There is a section of the Elisp manual specifically about this. I'd recommend that you start by reading that.
After that, I'd recommend that you look at the code for some simple major modes that come with Emacs. Emulating such code is a good way to start out, and to learn.
I'd also recommend that you read the parent section of that section, and other sibling sections (other subsections of the parent).
For example, you will see this in that parent node (Major Modes):
The standard GNU Emacs Lisp directory tree contains the code for several major modes, in files such as
rmail.el. You can study these libraries to see how modes are written.