我想使用cabal repl代替ghci(。我的目标是能够在我的项目中使用其他模块)。
My setups uses this:
(setq haskell-program-name "cabal repl")
(setq haskell-ghci-program-name "cabal repl")
(custom-set-variables
;; ...
'(haskell-process-type 'cabal-repl)
;; ...
)
concerning ghc and cabal and is running fine as it is (current ghc-mod and emacs 24.3.1)
GHC-mod has an issue about this, where the author suggests changing the GHCi executable:
(setq haskell-ghci-program-name "cabal")
(setq haskell-ghci-program-args '("repl"))
You should consider to setup Haskell Interactive Mode .
Unlike Inferior Haskell Mode, this mode is deeply integrated into Cabal. It does not only use cabal repl
, but also interprets Cabal error messages and suggests to add imports or language extensions, and provides completion for modules.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.