[Haskell-cafe] Flymake Haskell
nominolo at googlemail.com
Thu Nov 8 07:44:34 EST 2007
On Thu, 2007-11-08 at 12:57 +0900, Daisuke IKEGAMI wrote:
> Hello emacsen users,
> Here is a setting to check your Haskell code /on-the-fly/
> with 'flymake-mode'.
> (require 'flymake)
> ;; flymake for Haskell
> (defun flymake-Haskell-init ()
> 'flymake-create-temp-with-folder-structure nil nil
> (defun flymake-get-Haskell-cmdline (source base-dir)
> (list "ghc" (list "--make" (concat "-i" base-dir) source)))
> (push '(".+\\.hs$" flymake-Haskell-init)
> (push '(".+\\.lhs$" flymake-Haskell-init)
> (push '("^\\(.*\\):\\([0-9]+\\):\\([0-9]+\\): \\(.*\\)$" 1 2 3 4)
> The 'flymake-mode' has been developed at http://flymake.sourceforge.net/
> Emacs22 has this mode already.
> dons recommends to me at IRC to write this code into the wiki, however,
> I don't know where we should put the snippet.
> You can watch a short demo at the following blog:
> I have some complaints though it works:
> - it's slow (hmm)
(defun flymake-get-haskell-cmdline (source base-dir)
`("ghc" ("--make" "-fno-code" ,(concat "-i" base-dir) ,source)))
This avoids any kind of code-generation, so only syntax and types are
> - error and warning seems not distinguished
> (we may have to modify 'flymake-err-line-patterns')
> Any comment is appreciated.
It seems you need multi-line pattern matching. Note that shim already
can do this, but it doesn't do it automatically. Unfortunately, shim
chokes on files that need pre-processing. There's probably a way to
integrate these two.
> Best regards,
> I like vi-clone, such as vim, too. ;-)
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe