[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode ee1fb28 345/385: small cleanup
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode ee1fb28 345/385: small cleanup |
Date: |
Wed, 6 Oct 2021 00:00:01 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit ee1fb28821240c3b91def9f32ce13f027cbe9b0c
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
small cleanup
---
haskell-tng-hsinspect.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/haskell-tng-hsinspect.el b/haskell-tng-hsinspect.el
index 7914431..9795c48 100644
--- a/haskell-tng-hsinspect.el
+++ b/haskell-tng-hsinspect.el
@@ -71,10 +71,7 @@ definition of the symbol in the build tool's source archive."
(error "%s is defined in a local package" qualified)
(when-let* ((srcid (or internal-srcid (alist-get 'srcid pkg-entry)))
(module (or internal-module (alist-get 'module
module-entry)))
- (file (concat
- ;; TODO string-replace would be nice...
- (mapconcat 'identity (split-string module (rx "."))
"/" )
- ".hs"))
+ (file (concat (haskell-tng--string-replace module "." "/")
".hs"))
(tarball (haskell-tng--hsinspect-srcid-source srcid)))
(when (not (file-exists-p tarball))
;; We can't expect stack to reveal source locations because it
@@ -108,6 +105,9 @@ definition of the symbol in the build tool's source
archive."
(re-search-forward (rx-to-string `(: (| bol "= " "| " "data "
"type " "class ") ,name symbol-end)) nil t)
(re-search-forward (rx-to-string `(: symbol-start ,name
symbol-end))))))))))
+(defun haskell-tng--string-replace (str from to)
+ (mapconcat 'identity (split-string str (regexp-quote from)) to))
+
(defun haskell-tng--string-split-last (str sep)
"Return `(front . back)' of a STR split on the last SEP."
;; TODO optimise
- [nongnu] elpa/haskell-tng-mode 6299e6d 317/385: amazeballs idea, (continued)
- [nongnu] elpa/haskell-tng-mode 6299e6d 317/385: amazeballs idea, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode aa9cdbb 226/385: hacky file-specific language extensions, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode a4f06f5 237/385: an idea, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 0113f37 273/385: hsinspect should work on symbols with FQNs, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 06e4e76 245/385: support running scripts on nix, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3179294 267/385: rename ormolu command, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 388df13 282/385: refactor calls to hsinspect to allow for more callers, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 067e8a7 280/385: bugfix fontification of erroneous matches inside strings, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 224e955 307/385: add screencasts to the README, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b59ce04 356/385: improve testing, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ee1fb28 345/385: small cleanup,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode 1310276 346/385: planning, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 09018bc 352/385: support hsinspect beta releases, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e73bc19 335/385: jump-to-definition, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2f2c500 354/385: defining a test spec, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 232baf8 362/385: less import suggestions, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ab53433 375/385: reprioritise, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2b9c6bf 369/385: support dev hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 68d1d7c 371/385: bump hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6a31b59 101/385: document the plan for indentation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 9ec4841 104/385: meh indentation, ELPA Syncer, 2021/10/06