在过去的几天里,我一直在努力学习Haskell,所以现在是时候设置我的环境了。因此,我安装了Haskell平台和阴谋集团。
我的编辑器是emacs,我的操作系统是Windows。
我从github下载了ghc的主分支,并使用阴谋安装了依赖项,然后构建了这个项目。一切都进行得很顺利,可执行文件似乎也能正常工作。
像ghc-mod --version或ghc-mod boot这样的命令会像预期的那样工作。
然后,我在emacs上安装了haskell模式,并修改了.emacs以使用ghc。但是当我试图打开一个Haskell文件时,emacs会结结巴巴地说“初始化.”。
有什么问题吗?
GHC版本: 7.10.2阴谋版: 1.22.6.0使用阴谋库1.22.4.0版ghc-mod版本: 5.3.0.0由GHC 7.10.2编译
编辑1: 16/8/2015 11:10
以下是我添加到我的.emacs中的行
; haskell-mode
(add-hook 'haskell-mode-hook 'haskell-indentation-mode)
; ghc-mod for haskell
; I added to list path to ghc elisp file because I read somewhere that that's
; better than installing it from MELPA. I DID try to install it from melpa
; though. Didn't solve anything.
(add-to-list `load-path "~/cabal/x86_64-windows-ghc-7.10.2/ghc-mod-5.3.0.0/elisp")
(autoload 'ghc-init "ghc" nil t)
(autoload 'ghc-debug "ghc" nil t)
(add-hook 'haskell-mode-hook (lambda () (ghc-init)))当我第一次尝试打开haskell文件时Emacs会冻结。所以我猜它会在ghc-init()内部形成一个无限循环。
编辑2: 16/8/2015 21:16
来自ghc-debug的输出是这里
发布于 2015-08-19 16:44:12
我在ghc-mod github上开了一个问题,他们解决了这个问题。
您可以在这问题的评论中查看解决方案。
https://stackoverflow.com/questions/32030743
复制相似问题