Update elisps enable to pass ghc options widely.
This commit is contained in:
parent
21c5072e37
commit
fe13f74c16
@ -87,7 +87,7 @@ unloaded modules are loaded")
|
|||||||
(lambda ()
|
(lambda ()
|
||||||
(message "Loading names...")
|
(message "Loading names...")
|
||||||
(apply 'call-process ghc-module-command nil t nil
|
(apply 'call-process ghc-module-command nil t nil
|
||||||
(cons "-l" (cons "browse" mods)))
|
`(,@(ghc-make-ghc-options) "-l" "browse" ,@mods))
|
||||||
(message "Loading names...done"))
|
(message "Loading names...done"))
|
||||||
(length mods))))
|
(length mods))))
|
||||||
|
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'flymake)
|
(require 'flymake)
|
||||||
|
(require 'ghc-func)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(defvar ghc-hlint-options nil "*Hlint options")
|
(defvar ghc-hlint-options nil "*Hlint options")
|
||||||
(defvar ghc-ghc-options nil "*GHC options")
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
@ -47,8 +47,7 @@
|
|||||||
(if ghc-flymake-command
|
(if ghc-flymake-command
|
||||||
(let ((hopts (ghc-mapconcat (lambda (x) (list "-h" x)) ghc-hlint-options)))
|
(let ((hopts (ghc-mapconcat (lambda (x) (list "-h" x)) ghc-hlint-options)))
|
||||||
`(,@hopts "lint" ,file))
|
`(,@hopts "lint" ,file))
|
||||||
(let ((gopts (ghc-mapconcat (lambda (x) (list "-g" x)) ghc-ghc-options)))
|
`(,@(ghc-make-ghc-options) "check" ,file)))
|
||||||
`(,@gopts "check" ,file))))
|
|
||||||
|
|
||||||
(defun ghc-flymake-toggle-command ()
|
(defun ghc-flymake-toggle-command ()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
(defvar ghc-module-command "ghc-mod"
|
(defvar ghc-module-command "ghc-mod"
|
||||||
"*The command name of \"ghc-mod\"")
|
"*The command name of \"ghc-mod\"")
|
||||||
|
|
||||||
|
(defvar ghc-ghc-options nil "*GHC options")
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(defun ghc-replace-character (string from to)
|
(defun ghc-replace-character (string from to)
|
||||||
@ -135,4 +137,7 @@
|
|||||||
(fset getter (list 'lambda '(struct) (list 'nth i 'struct)))
|
(fset getter (list 'lambda '(struct) (list 'nth i 'struct)))
|
||||||
(setq keys (cdr keys)))))
|
(setq keys (cdr keys)))))
|
||||||
|
|
||||||
|
(defun ghc-make-ghc-options ()
|
||||||
|
(ghc-mapconcat (lambda (x) (list "-g" x)) ghc-ghc-options))
|
||||||
|
|
||||||
(provide 'ghc-func)
|
(provide 'ghc-func)
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
(file (buffer-name)))
|
(file (buffer-name)))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(cd cdir)
|
(cd cdir)
|
||||||
(call-process ghc-module-command nil t nil "type" file modname expr)
|
(apply 'call-process ghc-module-command nil t nil
|
||||||
|
`(,@(ghc-make-ghc-options) "type" ,file ,modname ,expr))
|
||||||
(message (buffer-substring (point-min) (1- (point-max)))))))
|
(message (buffer-substring (point-min) (1- (point-max)))))))
|
||||||
|
|
||||||
(defun ghc-show-info (&optional ask)
|
(defun ghc-show-info (&optional ask)
|
||||||
@ -49,7 +50,8 @@
|
|||||||
(insert
|
(insert
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(cd cdir)
|
(cd cdir)
|
||||||
(call-process ghc-module-command nil t nil "info" file modname expr)
|
(apply 'call-process ghc-module-command nil t nil
|
||||||
|
`(,@(ghc-make-ghc-options) "info" ,file ,modname ,expr))
|
||||||
(buffer-substring (point-min) (1- (point-max))))))
|
(buffer-substring (point-min) (1- (point-max))))))
|
||||||
(display-buffer buf)))
|
(display-buffer buf)))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user