@@ -143,29 +143,17 @@ If I break, you can:
143
143
Restores -fobject-code after reload finished.
144
144
MODULE-BUFFER is the actual Emacs buffer of the module being loaded."
145
145
(haskell-process-queue-without-filters process " :set -fbyte-code" )
146
- (haskell-process-touch-buffer process module-buffer)
147
- (haskell-process-queue-without-filters process " :reload" )
148
- (haskell-process-queue-without-filters process " :set -fobject-code" ))
149
-
150
- ;;;### autoload
151
- (defun haskell-process-touch-buffer (process buffer )
152
- " Query PROCESS to `:!touch` BUFFER's file.
153
- Use to update mtime on BUFFER's file."
154
- (interactive )
155
- (haskell-process-queue-command
146
+ ; ; We prefix the module's filename with a "*", which asks ghci to
147
+ ; ; ignore any existing object file and interpret the module.
148
+ ; ; Dependencies will still use their object files as usual.
149
+ (haskell-process-queue-without-filters
156
150
process
157
- (make-haskell-command
158
- :state (cons process buffer)
159
- :go (lambda (state )
160
- (haskell-process-send-string
161
- (car state)
162
- (format " :!%s %s "
163
- " touch"
164
- (shell-quote-argument (buffer-file-name
165
- (cdr state))))))
166
- :complete (lambda (state _ )
167
- (with-current-buffer (cdr state)
168
- (clear-visited-file-modtime ))))))
151
+ (format " :load \" *%s \" "
152
+ (replace-regexp-in-string
153
+ " \" "
154
+ " \\\\ \" "
155
+ (buffer-file-name module-buffer))))
156
+ (haskell-process-queue-without-filters process " :set -fobject-code" ))
169
157
170
158
(defvar url-http-response-status )
171
159
(defvar url-http-end-of-headers )
0 commit comments