File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1622,8 +1622,7 @@ will be returned directly."
1622
1622
sym (lambda (response )
1623
1623
(setq haskell-doc-current-info--interaction-last
1624
1624
(cons 'async response))
1625
- (eldoc-print-current-symbol-info )))
1626
- 'async )))))
1625
+ (eldoc-print-current-symbol-info ))))))))
1627
1626
1628
1627
(defun haskell-process-get-type (expr-string &optional callback sync )
1629
1628
" Asynchronously get the type of a given string.
@@ -1633,7 +1632,8 @@ EXPR-STRING should be an expression passed to :type in ghci.
1633
1632
CALLBACK will be called with a formatted type string.
1634
1633
1635
1634
If SYNC is non-nil, make the call synchronously instead."
1636
- (let ((process (haskell-process))
1635
+ (let ((process (and (haskell-session-maybe )
1636
+ (haskell-session-process (haskell-session-maybe ))))
1637
1637
; ; Avoid passing bad strings to ghci
1638
1638
(expr-okay (not (string-match-p " \n " expr-string)))
1639
1639
(ghci-command (concat " :type " expr-string))
@@ -1666,7 +1666,8 @@ If SYNC is non-nil, make the call synchronously instead."
1666
1666
process
1667
1667
(make-haskell-command
1668
1668
:go (lambda (_ ) (haskell-process-send-string process ghci-command))
1669
- :complete complete-func))))))
1669
+ :complete complete-func))
1670
+ 'async ))))
1670
1671
1671
1672
(defun haskell-doc-sym-doc (sym )
1672
1673
" Show the type of the function near point.
You can’t perform that action at this time.
0 commit comments