emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/haskell-tng-mode fdbd0a2 239/385: updates for hsinspect


From: ELPA Syncer
Subject: [nongnu] elpa/haskell-tng-mode fdbd0a2 239/385: updates for hsinspect
Date: Tue, 5 Oct 2021 23:59:39 -0400 (EDT)

branch: elpa/haskell-tng-mode
commit fdbd0a2822e6f1401b28a21f2bd03a3969abf571
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>

    updates for hsinspect
---
 README.md                       | 2 --
 haskell-tng-contrib-company.el  | 2 +-
 haskell-tng-hsinspect.el        | 9 ++++++---
 test/haskell-tng-indent-test.el | 1 +
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 6d0afc4..0b6486b 100644
--- a/README.md
+++ b/README.md
@@ -61,8 +61,6 @@ The optional command line tool 
[`hsinspect`](https://gitlab.com/tseenshe/hsinspe
 For now, only one version of `ghc` is supported at a time (change `ghc-8.4.4` 
to your current `ghc` version):
 
 ```
-git clone https://gitlab.com/tseenshe/hsinspect.git
-cd hsinspect
 cabal v2-install hsinspect --overwrite-policy=always -w ghc-8.4.4
 ```
 
diff --git a/haskell-tng-contrib-company.el b/haskell-tng-contrib-company.el
index 06e50cc..4d78e98 100644
--- a/haskell-tng-contrib-company.el
+++ b/haskell-tng-contrib-company.el
@@ -53,7 +53,7 @@
     ('candidates
      ;;(message "TNG asked with %S" arg)
      (seq-mapcat
-      (lambda (names) (all-completions arg names))
+      (lambda (names) (all-completions arg (seq-map #'cdr names)))
       (haskell-tng--hsinspect-imports)))
     ('sorted t)
     ('duplicates t)
diff --git a/haskell-tng-hsinspect.el b/haskell-tng-hsinspect.el
index bed4908..81a73a7 100644
--- a/haskell-tng-hsinspect.el
+++ b/haskell-tng-hsinspect.el
@@ -23,11 +23,14 @@ name of the symbol at point in the minibuffer."
   (interactive) ;; TODO prefix should copy to kill ring
   (if-let* ((sym (symbol-name (symbol-at-point)))
             (found (seq-find
-                    (lambda (names) (member sym names))
+                    (lambda (names) (member sym (seq-map #'cdr names)))
                     (haskell-tng--hsinspect-imports))))
       ;; TODO multiple hits
+      ;; TODO feedback when hsinspect is broken
       (message "%s" (car (last found)))
-    (message "<not imported>")))
+    (if (eq t haskell-tng--hsinspect-imports)
+        (error "hsinspect is not available")
+      (message "<not imported>"))))
 
 (defvar haskell-tng-hsinspect
   (concat
@@ -79,7 +82,7 @@ t means the process failed.")
                    ;; TODO async
                    "hsinspect"
                    nil "*hsinspect*" nil
-                   (append `("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
diff --git a/test/haskell-tng-indent-test.el b/test/haskell-tng-indent-test.el
index c7ed10b..f5f5ac2 100644
--- a/test/haskell-tng-indent-test.el
+++ b/test/haskell-tng-indent-test.el
@@ -12,6 +12,7 @@
 (require 'haskell-tng-testutils
          "test/haskell-tng-testutils.el")
 
+;; TODO line after `instance ... where' has too much indent
 ;; TODO records assigning / copy by label
 ;; TODO records of functions
 ;; TODO if/then/else



reply via email to

[Prev in Thread] Current Thread [Next in Thread]