introducing -i, -g, and -p.

This commit is contained in:
Kazu Yamamoto
2010-03-11 22:39:07 +09:00
parent 36fee672f3
commit ed5d50b6f9
8 changed files with 83 additions and 84 deletions

View File

@@ -15,8 +15,6 @@
;;; Customize Variables
;;;
(defvar ghc-module-command "ghc-mod")
(defvar ghc-idle-timer-interval 30)
;; must be sorted
@@ -66,7 +64,8 @@
(lambda ()
(let ((msg (mapconcat 'identity (cons ghc-module-command args) " ")))
(message "Executing \"%s\"..." msg)
(apply 'call-process ghc-module-command nil t nil (cons "-l" args))
(apply 'call-process ghc-module-command nil t nil
(append '("-l") (ghc-module-command-args) args))
(message "Executing \"%s\"...done" msg))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View File

@@ -18,6 +18,7 @@
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "ghc-mod" (list "check" local-file))))
(list "ghc-mod" (append (ghc-module-command-args)
(list "check" local-file)))))
(provide 'ghc-flymake)

View File

@@ -49,4 +49,16 @@
(defun ghc-read-module-name (def)
(read-from-minibuffer "Module name: " def ghc-input-map))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar ghc-module-command "ghc-mod")
(defvar ghc-ghc-command (ghc-which "ghc"))
(defvar ghc-ghci-command (ghc-which "ghci"))
(defvar ghc-ghc-pkg-command (ghc-which "ghc-pkg"))
(defun ghc-module-command-args ()
(list "-g" ghc-ghc-command
"-i" ghc-ghci-command
"-p" ghc-ghc-pkg-command))
(provide 'ghc-func)