@@ -93,8 +93,12 @@ You can create new session using function `haskell-session-make'."
93
93
:go (lambda (process )
94
94
; ; We must set the prompt last, so that this command as a
95
95
; ; whole produces only one prompt marker as a response.
96
- (haskell-process-send-string process " Prelude.putStrLn \"\" " )
97
- (haskell-process-send-string process " :set -v1" )
96
+ (haskell-process-send-string process
97
+ (mapconcat #'identity
98
+ '(" Prelude.putStrLn \"\" "
99
+ " :set -v1"
100
+ " :set +c" ) ; :type-at in GHC 8+
101
+ " \n " ))
98
102
(haskell-process-send-string process " :set prompt \" \\ 4\" " )
99
103
(haskell-process-send-string process (format " :set prompt2 \" %s \" "
100
104
haskell-interactive-prompt2)))
@@ -607,9 +611,7 @@ Query PROCESS to `:cd` to directory DIR."
607
611
;;;### autoload
608
612
(defun haskell-mode-show-type-at (&optional insert-value )
609
613
" Show type of the thing at point or within active region asynchronously.
610
- This function requires GHCi-ng and `:set +c` option enabled by
611
- default (please follow GHCi-ng README available at URL
612
- `https://github.com/chrisdone/ghci-ng' ).
614
+ This function requires GHCi 8+ or GHCi-ng.
613
615
614
616
\\ <haskell-interactive-mode-map>
615
617
To make this function works sometimes you need to load the file in REPL
@@ -650,7 +652,7 @@ happened since function invocation)."
650
652
; ; neither popup presentation buffer
651
653
; ; nor insert response in error case
652
654
('unknown-command
653
- (message " This command requires GHCi-ng. Please read command description for details. " ))
655
+ (message " This command requires GHCi 8+ or GHCi -ng. Please read command description for details. " ))
654
656
('option-missing
655
657
(message " Could not infer type signature. You need to load file first. Also :set +c is required. Please read command description for details. " ))
656
658
('interactive-error (message " Wrong REPL response: %s " sig))
0 commit comments