Skip to content

Commit 9668ba2

Browse files
committed
Always use buffer-file-name for ghc compilation
1 parent 0d39c84 commit 9668ba2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

haskell-compile.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
;; Copyright (C) 2013 Herbert Valerio Riedel
44
;; 2020 Marc Berkowitz <mberkowitz@github.com>
5+
;; 2020 Jacob Ilsø
56

67
;; Author: Herbert Valerio Riedel <hvr@gnu.org>
78

@@ -170,7 +171,7 @@ base directory for build tools, or the current buffer for
170171
(interactive "P")
171172
(save-some-buffers (not compilation-ask-about-save)
172173
compilation-save-buffers-predicate)
173-
(let (htype dir)
174+
(let (htype dir)
174175
;;test haskell-compiler-type to set htype and dir
175176
(cond
176177
((eq haskell-compiler-type 'cabal)
@@ -180,8 +181,7 @@ base directory for build tools, or the current buffer for
180181
(setq htype 'stack)
181182
(setq dir (locate-dominating-file default-directory "stack.yaml")))
182183
((eq haskell-compiler-type 'ghc)
183-
(setq htype 'ghc)
184-
(setq dir (buffer-file-name)))
184+
(setq htype 'ghc))
185185
((eq haskell-compiler-type 'auto)
186186
(let ((r (haskell-build-type)))
187187
(setq htype (car r))
@@ -204,7 +204,7 @@ base directory for build tools, or the current buffer for
204204
haskell-compile-stack-build-command
205205
haskell-compile-stack-build-alt-command))
206206
((eq htype 'ghc)
207-
(haskell--compile dir edit-command
207+
(haskell--compile (buffer-file-name) edit-command
208208
'haskell--compile-ghc-last
209209
haskell-compile-command
210210
haskell-compile-command)))))

0 commit comments

Comments
 (0)