branch: elpa/haskell-tng-mode commit 5892c04c2d5023f1802b8d985659513956e53ece Author: Tseen She <ts33n....@gmail.com> Commit: Tseen She <ts33n....@gmail.com>
small things --- haskell-tng-compile.el | 3 ++- haskell-tng-contrib-company.el | 4 ++-- haskell-tng-hsinspect.el | 13 +++++-------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/haskell-tng-compile.el b/haskell-tng-compile.el index 6b1600a..1382d6d 100644 --- a/haskell-tng-compile.el +++ b/haskell-tng-compile.el @@ -62,7 +62,8 @@ (defvar haskell-tng--compile-history ;; Prefer --enable-tests due to ;; https://github.com/haskell/cabal/issues/6114 - '("cabal v2-build -O0 --enable-tests " + '("cabal v2-build -O0 --enable-tests :all:libraries" + "cabal v2-build -O0 --enable-tests " "cabal v2-run -O0 --enable-tests tasty -- ")) (defvar-local haskell-tng--compile-command nil) (defvar-local haskell-tng--compile-alt "cabal v2-clean") diff --git a/haskell-tng-contrib-company.el b/haskell-tng-contrib-company.el index da66a76..c53baae 100644 --- a/haskell-tng-contrib-company.el +++ b/haskell-tng-contrib-company.el @@ -26,8 +26,8 @@ (defcustom haskell-tng-company-backends '(company-files - haskell-tng--company-hsinspect - (company-dabbrev-code company-keywords)) + (company-dabbrev-code company-keywords) + haskell-tng--company-hsinspect) "The company mode backends to use for haskell files" :type 'listp :group 'haskell-tng) diff --git a/haskell-tng-hsinspect.el b/haskell-tng-hsinspect.el index 5fcd3a8..37f1423 100644 --- a/haskell-tng-hsinspect.el +++ b/haskell-tng-hsinspect.el @@ -44,6 +44,8 @@ name of the symbol at point in the minibuffer." (message "%s" (car (last found))) (message "<not imported>"))) +;; FIXME implement the `.hsinspect.env' hack and document the workflow + ;; TODO invalidate cache when imports section has changed ;; TODO is there a way to tell Emacs not to render this in `C-h v'? ;; (suggestion is to advise around describe-key) @@ -66,14 +68,9 @@ t means the process failed.") ;; TODO launching the correct hsinspect-ghc-X version ;; TODO is there a way to pipe into a string not a buffer? ;; TODO async - (if haskell-tng-hsinspect - (car haskell-tng-hsinspect) - "hsinspect") + "hsinspect" nil "*hsinspect*" nil - (append (when haskell-tng-hsinspect - (append (cdr haskell-tng-hsinspect) - '("hsinspect"))) - `("imports" ,buffer-file-name) + (append `("imports" ,buffer-file-name) haskell-tng-hsinspect-langexts))) (user-error "`hsinspect' failed. See the *hsinspect* buffer for more information.") (setq haskell-tng--hsinspect-imports @@ -81,7 +78,7 @@ t means the process failed.") (goto-char (point-min)) (re-search-forward (rx bol "(") nil t) ;; sometimes there is junk from the launcher (goto-char (match-beginning 0)) - (read (current-buffer)))))))) + (or (ignore-errors (read (current-buffer))) t))))))) (provide 'haskell-tng-hsinspect) ;;; haskell-tng-hsinspect.el ends here