关注haskell repl in emacs,我可以安装软件包。我使用MELPA stable for repository('("melpa-stable" . "http://stable.melpa.org/packages/") t)
)
我还使用cabal
安装了二进制文件。
Cabal版本1.22.6.0,Mac OS X 10.10.4上的GNU Emacs版本24.5.1。
问题在于,当我尝试使用C-`运行ghci时,我收到了错误消息。
command-execute: Autoloading failed to define function haskell-interactive-bring
使用C-c C-l
,我收到此错误消息。
command-execute: Autoloading failed to define function haskell-process-load-or-reload
可能有什么问题?
这是init.el
中与Haskell相关的代码。
;; Haskell
; http://www.mew.org/~kazu/proj/ghc-mod/en/preparation.html
(autoload 'ghc-init "ghc" nil t)
(autoload 'ghc-debug "ghc" nil t)
(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation).
; https://github.com/serras/emacs-haskell-tutorial/blob/master/tutorial.md
; https://stackoverflow.com/questions/26603649/haskell-repl-in-emacs
(let ((my-cabal-path (expand-file-name "~/Library/Haskell/bin")))
(setenv "PATH" (concat my-cabal-path ":" (getenv "PATH")))
(add-to-list 'exec-path my-cabal-path))
(custom-set-variables '(haskell-tags-on-save t))
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
(eval-after-load 'haskell-mode '(progn
(define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload)
(define-key haskell-mode-map (kbd "C-`") 'haskell-interactive-bring)
(define-key haskell-mode-map (kbd "C-c C-n C-t") 'haskell-process-do-type)
(define-key haskell-mode-map (kbd "C-c C-n C-i") 'haskell-process-do-info)
(define-key haskell-mode-map (kbd "C-c C-n C-c") 'haskell-process-cabal-build)
(define-key haskell-mode-map (kbd "C-c C-n c") 'haskell-process-cabal)))
(eval-after-load 'haskell-cabal '(progn
(define-key haskell-cabal-mode-map (kbd "C-`") 'haskell-interactive-bring)
(define-key haskell-cabal-mode-map (kbd "C-c C-k") 'haskell-interactive-ode-clear)
(define-key haskell-cabal-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build)
(define-key haskell-cabal-mode-map (kbd "C-c c") 'haskell-process-cabal)))
(custom-set-variables
'(haskell-interactive-mode-hide-multi-line-errors nil)
'(haskell-process-log t)
'(haskell-process-type (quote cabal-repl)))
在Emacs中,自动完成显示" haskell-interactive-bring"功能可用。
但是,autoloading
失败了。
答案 0 :(得分:0)
问题是我有" haskell.el"存储所有与haskell相关的配置设置。这引起了一些冲突,以便" haskell.el"在ELPA/haskell...
包中无法正确加载。
当我重命名我的" haskell.el" to" haskell_config.el",一切似乎都运转正常。