我想使用 cabal repl 代替 ghci(我的目标是能够在我的项目中使用其他模块)。
我的设置使用以下内容:
(setq haskell-program-name "cabal repl")
(setq haskell-ghci-program-name "cabal repl")
(custom-set-variables
;; ...
'(haskell-process-type 'cabal-repl)
;; ...
)
关于 GHC 和 Cabal,当前的 ghc-mod 和 Emacs 24.3.1 运行良好。
GHC-mod存在一个关于此问题的问题,其中作者建议更改GHCi可执行文件:
(setq haskell-ghci-program-name "cabal")
(setq haskell-ghci-program-args '("repl"))
cabal repl
,还解释Cabal错误消息并建议添加导入或语言扩展,并为模块提供完成功能。