@@ -873,9 +873,11 @@ from `module-buffer'."
873
873
cabal-file))
874
874
(haskell-cabal-add-dependency package-name version nil t ))))
875
875
876
- (defun haskell-process-suggest-imports (imports ident )
877
- " Given a list of IMPORTS, suggest adding them to the import section."
878
- (let ((module (cond ((> (length modules) 1 )
876
+ (defun haskell-process-suggest-imports (modules ident )
877
+ " Given a list of MODULES, suggest adding them to the import section."
878
+ (let ((process (haskell-session-process session))
879
+ (suggested-already (haskell-process-suggested-imports process))
880
+ (module (cond ((> (length modules) 1 )
879
881
(when (y-or-n-p (format " Identifier `%s' not in scope, choose module to import? "
880
882
ident))
881
883
(haskell-complete-module-read " Module: " modules)))
@@ -901,9 +903,7 @@ from `module-buffer'."
901
903
" Given an out of scope identifier, Hoogle for that identifier,
902
904
and if a result comes back, suggest to import that identifier
903
905
now."
904
- (let* ((process (haskell-session-process session))
905
- (suggested-already (haskell-process-suggested-imports process))
906
- (ident (let ((i (match-string 1 msg)))
906
+ (let* ((ident (let ((i (match-string 1 msg)))
907
907
; ; Skip qualification.
908
908
(if (string-match " ^[A-Za-z0-9_'.]+\\ .\\ (.+\\ )$" i)
909
909
(match-string 1 i)
@@ -915,9 +915,7 @@ now."
915
915
" Given an out of scope identifier, Hayoo for that identifier,
916
916
and if a result comes back, suggest to import that identifier
917
917
now."
918
- (let* ((process (haskell-session-process session))
919
- (suggested-already (haskell-process-suggested-imports process))
920
- (ident (let ((i (match-string 1 msg)))
918
+ (let* ((ident (let ((i (match-string 1 msg)))
921
919
; ; Skip qualification.
922
920
(if (string-match " ^[A-Za-z0-9_'.]+\\ .\\ (.+\\ )$" i)
923
921
(match-string 1 i)
0 commit comments