@@ -120,7 +120,8 @@ See `haskell-process-do-cabal' for more details."
120
120
'ghci
121
121
" The inferior Haskell process type to use."
122
122
:type '(choice (const ghci) (const cabal-repl) (const cabal-dev)
123
- (const cabal-ghci) (const nix-shell-ghci))
123
+ (const cabal-ghci) (const nix-shell-ghci)
124
+ (const nix-shell-cabal-repl))
124
125
:group 'haskell-interactive )
125
126
126
127
(defcustom haskell-process-log
@@ -519,7 +520,8 @@ for various things, but is optional."
519
520
path. This allows modules such as 'Path_...', generated by cabal,
520
521
to be loaded by ghci."
521
522
(unless (or (eq 'cabal-repl haskell-process-type) ; ; redundant with "cabal repl"
522
- (eq 'nix-shell-ghci haskell-process-type))
523
+ (eq 'nix-shell-ghci haskell-process-type)
524
+ (eq 'nix-shell-cabal-repl haskell-process-type))
523
525
(let*
524
526
((session (haskell-session ))
525
527
(cabal-dir (haskell-session-cabal-dir session))
@@ -551,10 +553,15 @@ to be loaded by ghci."
551
553
('nix-shell-ghci (concat haskell-process-path-nix-shell
552
554
" "
553
555
haskell-process-args-nix-shell
554
- " --command '" )))
556
+ " --command '" ))
557
+ ('nix-shell-cabal-repl (concat haskell-process-path-nix-shell
558
+ " "
559
+ haskell-process-args-nix-shell
560
+ " --command '" )))
555
561
(caddr state)
556
562
(case haskell-process-type
557
563
('nix-shell-ghci " '" )
564
+ ('nix-shell-cabal-repl " '" )
558
565
(t " " ))))))
559
566
560
567
:live
@@ -1086,6 +1093,19 @@ now."
1086
1093
(format " Starting inferior nix-shell (ghci) process using %s ... "
1087
1094
(mapconcat 'identity args " " ))
1088
1095
'face font-lock-comment-face ))
1096
+ (apply #'start-process
1097
+ (append (list (haskell-session-name session)
1098
+ nil )
1099
+ args))))
1100
+ ('nix-shell-cabal-repl
1101
+ (let ((args (append (list haskell-process-path-nix-shell)
1102
+ haskell-process-args-nix-shell
1103
+ '(" --command" " cabal repl" ))))
1104
+ (haskell-process-log
1105
+ (propertize
1106
+ (format " Starting inferior nix-shell (cabal repl) process using %s ... "
1107
+ (mapconcat 'identity args " " ))
1108
+ 'face font-lock-comment-face ))
1089
1109
(apply #'start-process
1090
1110
(append (list (haskell-session-name session)
1091
1111
nil )
0 commit comments