How can I use `cabal repl` instead of `ghci` in `ghc-mod`?
Asked Answered
H

3

7

I want to use cabal repl to instead of ghci (. My goal is being able to use other modules in my project ).

Hairworm answered 30/8, 2014 at 8:35 Comment(1)
github.com/serras/emacs-haskell-tutorial/blob/master/…Cartercarteret
C
5

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)

Cormack answered 30/8, 2014 at 17:38 Comment(0)
G
4

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"))
Gynarchy answered 30/8, 2014 at 16:26 Comment(0)
L
3

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.

Lucilius answered 31/8, 2014 at 16:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.