[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode f7e8040 213/385: = ends a type sig
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode f7e8040 213/385: = ends a type sig |
Date: |
Tue, 5 Oct 2021 23:59:33 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit f7e8040060c24603a5227fe6cb5c2008be20f2e3
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
= ends a type sig
---
haskell-tng-font-lock.el | 4 ++--
haskell-tng-util.el | 5 ++---
test/src/medley.hs | 1 +
test/src/medley.hs.faceup | 1 +
test/src/medley.hs.layout | 3 ++-
test/src/medley.hs.lexer | 3 ++-
test/src/medley.hs.syntax | 1 +
7 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/haskell-tng-font-lock.el b/haskell-tng-font-lock.el
index 8d18859..acbc923 100644
--- a/haskell-tng-font-lock.el
+++ b/haskell-tng-font-lock.el
@@ -282,8 +282,8 @@ succeeds and may further restrict the FIND search limit."
(rx symbol-start "::" symbol-end (group (+
anything)))
haskell-tng--util-paren-close
haskell-tng--util-indent-close-previous
- haskell-tng--util-do-bind)
-;; TODO commas end a type signature in a record of functions
+ haskell-tng--util-type-ender)
+;; TODO commas end a type signature in a record of functions (but can be used
in tuples, so complex)
(haskell-tng--font-lock-multiline topdecl
(rx line-start (| "data" "newtype" "class"
"instance") word-end)
diff --git a/haskell-tng-util.el b/haskell-tng-util.el
index 4155bd7..46b7f44 100644
--- a/haskell-tng-util.el
+++ b/haskell-tng-util.el
@@ -35,12 +35,11 @@
(throw 'closed (point))))
nil))))
-(defun haskell-tng--util-do-bind (&optional pos)
+(defun haskell-tng--util-type-ender (&optional pos)
;; trivial, should just be called as an inline regexp
- "The next `<-'"
(save-excursion
(goto-char (or pos (point)))
- (re-search-forward "<-" nil t)))
+ (re-search-forward (rx (| "<-" "=")) nil t)))
(defun haskell-tng--util-next-where (&optional pos)
;; trivial, should just be called as an inline regexp
diff --git a/test/src/medley.hs b/test/src/medley.hs
index d55706a..46199a3 100644
--- a/test/src/medley.hs
+++ b/test/src/medley.hs
@@ -138,6 +138,7 @@ deriving newtype instance FromJSON Treble
foo = do
bar :: Wibble <- baz
+ let waz :: Wazzy = woz
where baz = _
-- checking that comments are ignored in layout
-- and that a starting syntax entry is ok
diff --git a/test/src/medley.hs.faceup b/test/src/medley.hs.faceup
index a1a7da7..a21f0f3 100644
--- a/test/src/medley.hs.faceup
+++ b/test/src/medley.hs.faceup
@@ -138,6 +138,7 @@ optionsParser
«:haskell-tng-keyword-face:::»«:haskell-tng-type-face: Opts.Par
foo «:haskell-tng-keyword-face:=» «:haskell-tng-keyword-face:do»
bar «:haskell-tng-keyword-face:::»«:haskell-tng-type-face: Wibble
»«:haskell-tng-keyword-face:<-» baz
+ «:haskell-tng-keyword-face:let» waz
«:haskell-tng-keyword-face:::»«:haskell-tng-type-face: Wazzy
»«:haskell-tng-keyword-face:=» woz
«:haskell-tng-keyword-face:where» baz «:haskell-tng-keyword-face:=»
«:haskell-tng-keyword-face:_»
«m:-- »«x:checking that comments are ignored in layout
» «m:-- »«x:and that a starting syntax entry is ok
diff --git a/test/src/medley.hs.layout b/test/src/medley.hs.layout
index 178e162..0efd464 100644
--- a/test/src/medley.hs.layout
+++ b/test/src/medley.hs.layout
@@ -138,7 +138,8 @@ module Foo.Bar.Main
;foo = do
{bar :: Wibble <- baz
- ;where {baz = _
+ ;let {waz :: Wazzy = woz
+ };where {baz = _
-- checking that comments are ignored in layout
-- and that a starting syntax entry is ok
;(+) = _
diff --git a/test/src/medley.hs.lexer b/test/src/medley.hs.lexer
index b676f68..aee34e2 100644
--- a/test/src/medley.hs.lexer
+++ b/test/src/medley.hs.lexer
@@ -138,7 +138,8 @@ CONSYM CONID « CONID » « CONID CONID »
; VARID = do
{ VARID :: CONID <- VARID
-; where { VARID = _
+; let { VARID :: CONID = VARID
+} ; where { VARID = _
; « SYMID » = _
diff --git a/test/src/medley.hs.syntax b/test/src/medley.hs.syntax
index fe3ab6f..60cbb3d 100644
--- a/test/src/medley.hs.syntax
+++ b/test/src/medley.hs.syntax
@@ -138,6 +138,7 @@ wwwwwwww wwwwwww wwwwwwww wwwwwwww wwwwww>
>
www _ ww>
www __ wwwwww __ www>
+ www www __ wwwww _ www>
wwwww www _ w>
__ wwwwwwww wwww wwwwwwww www wwwwwww ww wwwwww>
__ www wwww w wwwwwwww wwwwww wwwww ww ww>
- [nongnu] elpa/haskell-tng-mode 3ff278e 227/385: ability to not continue comments, (continued)
- [nongnu] elpa/haskell-tng-mode 3ff278e 227/385: ability to not continue comments, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode dbcef71 235/385: workaround the env file situation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5892c04 232/385: small things, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 44dc467 248/385: notes on motivation, contributing and collaboration, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6f2b5ee 266/385: font lock CPP, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode fdbd0a2 239/385: updates for hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b2e2c3a 293/385: stop stack from being an asshole, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ee07f6d 172/385: type indentation tests, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 59354b6 198/385: support hanging type alignment, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode a788ab2 209/385: more efficient layout caching, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f7e8040 213/385: = ends a type sig,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode fe9d65d 222/385: helper for yatemplates, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode bc93c3d 224/385: very alpha hsinspect support, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 658ddb6 251/385: docs, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 73a60f5 309/385: cache `which hsinspect` per project, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5707166 365/385: use new ghcflags-provided PATH, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b1c664b 364/385: allow hsinspect population in the background, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ce17d96 376/385: new hsinspect release, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode eb6b487 357/385: test fqn-at-point and fix a longstanding bug, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 103e758 325/385: expose some more hsinspect-0.0.8 index info, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 374835c 355/385: a test for interactive commands, ELPA Syncer, 2021/10/06