[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 1e3c465 329/385: import types and data co
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 1e3c465 329/385: import types and data constructors |
Date: |
Tue, 5 Oct 2021 23:59:58 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 1e3c4650bbe8d0385da8ce80deee8f01227dc2e0
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
import types and data constructors
---
haskell-tng-hsinspect.el | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/haskell-tng-hsinspect.el b/haskell-tng-hsinspect.el
index 19e2f72..0616943 100644
--- a/haskell-tng-hsinspect.el
+++ b/haskell-tng-hsinspect.el
@@ -83,10 +83,24 @@ Respects the `C-u' cache invalidation convention."
'no-error))
(insert fqn ".")))
(pcase (alist-get 'class hit)
- ('tycon (haskell-tng--import-symbol module nil (alist-get 'type
hit)))
- ;; FIXME con
+ ('tycon
+ (haskell-tng--import-symbol
+ module nil
+ (haskell-tng--hsinspect-return-type (alist-get 'type hit))))
+ ('con
+ (haskell-tng--import-symbol
+ module nil
+ (concat (haskell-tng--hsinspect-return-type (alist-get 'type
hit)) "(..)")))
(_ (haskell-tng--import-symbol module nil (alist-get 'name
hit))))))))))
+(defun haskell-tng--hsinspect-return-type (type)
+ (car
+ (split-string
+ (car
+ (last
+ (split-string
+ type (rx "->" (* space))))))))
+
;; TODO expand out pattern matches (function defns and cases) based on the cons
;; for a type obtained from the Index.
@@ -121,7 +135,6 @@ When using hsinspect-0.0.8, also: class, export, flavour."
(lambda (module-entry)
(let ((module (alist-get 'module module-entry))
(ids (alist-get 'ids module-entry)))
- ;;(message "MODULE= %s" module)
(seq-mapcat
(lambda (entry)
(let ((name (alist-get 'name entry))
@@ -130,7 +143,6 @@ When using hsinspect-0.0.8, also: class, export, flavour."
(export (alist-get 'export entry))
(flavour (alist-get 'flavour entry)))
(when (or (equal name sym) (equal type sym))
- ;; TODO add the hsinspect-0.0.8 bits
`(((unitid . ,unitid)
(module . ,module)
(name . ,name)
@@ -209,7 +221,7 @@ When using hsinspect-0.0.8, also: class, export, flavour."
"Finds and checks the hsinspect binary for the current buffer.
This is uncached, prefer `haskell-tng--hsinspect-exe'."
- (let ((supported '("0.0.7" "0.0.8"))
+ (let ((supported '("0.0.7" "0.0.8" "0.0.9"))
(bin
(car
(last
- [nongnu] elpa/haskell-tng-mode afbac7c 300/385: missing import, (continued)
- [nongnu] elpa/haskell-tng-mode afbac7c 300/385: missing import, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 7060573 286/385: moar work to do here, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 89db192 289/385: more thots, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b46dbd1 305/385: refactoring of the cache for more reuse later, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ff76e07 304/385: cache the index command, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2653ce7 312/385: checks on the hsinspect binary, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode da20f0d 314/385: note about limitations on nixos, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 52d984a 324/385: fix cache typo, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ae8ebbc 320/385: thots, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode aca98c2 333/385: simplify import-symbol-at-point logic, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1e3c465 329/385: import types and data constructors,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode 3ab7495 342/385: thots, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ef3cea6 340/385: thots, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode a14a2c2 332/385: allow dir locals for the -as lookups, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2050c16 323/385: bad parameter order, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2d50a06 358/385: enable CI, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 923fa9e 344/385: bugfixes in jump-to-definition, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3939303 334/385: importing from the hsinspect index will update the buffer cache, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3ea52c1 341/385: special case jumping to inplace packages, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 4217d98 378/385: fixup! third party tools use project specific PATH, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f7f0e0f 383/385: moar extras, ELPA Syncer, 2021/10/06