Emacs flymake for HTML and Haskell modes

I’m using the default Emacs 23 on Ubuntu 11.10 and both the HTML and Haskell flymake modes seem to be broken. For the HTML mode the problem seems to be that the version of xmlstarlet installed on Ubuntu needs another command line switch to make it print out the information that flymake needs, like line numbers. Here is some elisp code to fix that:

(defun flymake-xml-init ()
  (list "xmlstarlet"
        (list "val" "-e" "-q" 
              (flymake-init-create-temp-buffer-copy 
               'flymake-create-temp-inplace))))

Strictly speaking I don’t think the -q argument is actually needed, but it suppresses a superfluous line in the output.

For the Haskell mode, as far as I can tell it simply doesn’t work quite right and the elisp code is broken. Maybe I’m just not setting it up right, but out of the box it does not work. This makes it work using the hlint checker:

(defun haskell-flymake-init ()
  (list "hlint" (list (flymake-init-create-temp-buffer-copy
                       'flymake-create-temp-inplace))))

Happy hacking!