[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 907c8fa 153/385: ImplicitParams indentati
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 907c8fa 153/385: ImplicitParams indentation |
Date: |
Tue, 5 Oct 2021 23:59:20 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 907c8fadcfdd3a78dfedffab30be16c437b9dee0
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
ImplicitParams indentation
---
haskell-tng-rx.el | 4 ++-
test/haskell-tng-indent-test.el | 1 -
test/haskell-tng-syntax-test.el | 2 ++
test/src/indentation.hs | 5 +++
test/src/indentation.hs.append.indent | 10 ++++++
test/src/indentation.hs.insert.indent | 10 ++++++
test/src/indentation.hs.layout | 7 +++-
test/src/indentation.hs.lexer | 7 +++-
test/src/indentation.hs.reindent | 12 ++++++-
test/src/indentation.hs.sexps | 9 +++--
test/src/indentation.hs.syntax | 67 +++++++++++++++++++++++++++++++++++
11 files changed, 127 insertions(+), 7 deletions(-)
diff --git a/haskell-tng-rx.el b/haskell-tng-rx.el
index a5135a7..bf090bd 100644
--- a/haskell-tng-rx.el
+++ b/haskell-tng-rx.el
@@ -88,7 +88,9 @@ give false positives." `(|
(defconst haskell-tng:regexp:conid
(rx-to-string `(: word-start ,haskell-tng:rx:conid)))
(defconst haskell-tng:regexp:varid
- (rx-to-string `(: word-start ,haskell-tng:rx:varid)))
+ (rx-to-string `(| (: word-start ,haskell-tng:rx:varid)
+ (: symbol-start (char ??) ,haskell-tng:rx:varid) ;;
ImplicitParams
+ )))
(defconst haskell-tng:regexp:symid
(rx-to-string haskell-tng:rx:symid))
(defconst haskell-tng:regexp:toplevel
diff --git a/test/haskell-tng-indent-test.el b/test/haskell-tng-indent-test.el
index e8643e6..977bc6e 100644
--- a/test/haskell-tng-indent-test.el
+++ b/test/haskell-tng-indent-test.el
@@ -17,7 +17,6 @@
;; TODO long type signatures vs definitions
;; TODO if/then/else
;; TODO following opening bracket in a record defn, shouldn't indent so much
-;; TODO ImplicitParams in let
;; Three indentation regression tests are possible:
;;
diff --git a/test/haskell-tng-syntax-test.el b/test/haskell-tng-syntax-test.el
index efb2e5a..c8a64a4 100644
--- a/test/haskell-tng-syntax-test.el
+++ b/test/haskell-tng-syntax-test.el
@@ -53,6 +53,8 @@
(should (have-expected-syntax (testdata "src/medley.hs")))
(should (have-expected-syntax (testdata "src/layout.hs")))
+
+ (should (have-expected-syntax (testdata "src/indentation.hs")))
)
;;; haskell-tng-syntax-test.el ends here
diff --git a/test/src/indentation.hs b/test/src/indentation.hs
index 74df4bd..42cb7b4 100644
--- a/test/src/indentation.hs
+++ b/test/src/indentation.hs
@@ -47,6 +47,11 @@ let_in a b = let
in
flibble blah
+implicit_let foo bar =
+ let ?foo = foo
+ ?bar = bar
+ in rar
+
case_of wibble = case wibble of
Nothing -> ""
Just fish -> fish
diff --git a/test/src/indentation.hs.append.indent
b/test/src/indentation.hs.append.indent
index 4d7ad5c..3d8ddab 100644
--- a/test/src/indentation.hs.append.indent
+++ b/test/src/indentation.hs.append.indent
@@ -96,6 +96,16 @@ let_in a b = let
2 v 1
1 v 2
+implicit_let foo bar =
+1 v
+ let ?foo = foo
+1 v
+ ?bar = bar
+1 v
+ in rar
+v 1 2
+
+v 1 2
case_of wibble = case wibble of
1 v
Nothing -> ""
diff --git a/test/src/indentation.hs.insert.indent
b/test/src/indentation.hs.insert.indent
index 57835ab..a82b222 100644
--- a/test/src/indentation.hs.insert.indent
+++ b/test/src/indentation.hs.insert.indent
@@ -96,6 +96,16 @@ let_in a b = let
2 v 1
1 v 2
+implicit_let foo bar =
+1 v 2
+ let ?foo = foo
+1 v
+ ?bar = bar
+2 1 v
+ in rar
+v 1 2
+
+v 1 2
case_of wibble = case wibble of
1 v
Nothing -> ""
diff --git a/test/src/indentation.hs.layout b/test/src/indentation.hs.layout
index 93e42c6..a23d743 100644
--- a/test/src/indentation.hs.layout
+++ b/test/src/indentation.hs.layout
@@ -47,7 +47,12 @@ module Indentation where
;in
flibble blah
-};case_of wibble = case wibble of
+};implicit_let foo bar =
+ let {?foo = foo
+ ;?bar = bar
+ }in rar
+
+;case_of wibble = case wibble of
{Nothing -> ""
;Just fish -> fish
diff --git a/test/src/indentation.hs.lexer b/test/src/indentation.hs.lexer
index 1e34f64..81e8b7b 100644
--- a/test/src/indentation.hs.lexer
+++ b/test/src/indentation.hs.lexer
@@ -47,7 +47,12 @@ where
; in
VARID VARID
-} ; VARID VARID = case VARID of
+} ; VARID VARID VARID =
+let { VARID = VARID
+; VARID = VARID
+} in VARID
+
+; VARID VARID = case VARID of
{ CONID -> ยง
; CONID VARID -> VARID
diff --git a/test/src/indentation.hs.reindent b/test/src/indentation.hs.reindent
index 8383795..a8f3fce 100644
--- a/test/src/indentation.hs.reindent
+++ b/test/src/indentation.hs.reindent
@@ -96,7 +96,17 @@ v 1 2
flibble blah
2 v 1
-v 1 2
+v 2 3 1
+implicit_let foo bar =
+v 1
+ let ?foo = foo
+v 2 1
+ ?bar = bar
+v 1
+ in rar
+v 1 2
+
+v 1 2
case_of wibble = case wibble of
1 v
Nothing -> ""
diff --git a/test/src/indentation.hs.sexps b/test/src/indentation.hs.sexps
index f07a653..eea2d64 100644
--- a/test/src/indentation.hs.sexps
+++ b/test/src/indentation.hs.sexps
@@ -47,7 +47,12 @@
)in)
(flibble) (blah)
-)(case_of) (wibble) = ((case (wibble) (of)
+)(implicit_let) (foo) (bar) =
+ (let ((?foo) = (foo)
+ ((?bar) = (bar))
+ )in) (rar)
+
+((case_of) (wibble) = ((case (wibble) (of)
((Nothing) -> ("")
((Just) (fish) -> (fish))
@@ -59,5 +64,5 @@
("") ("")
("")
((dollars) (f) ((Just) (a)) = (f) $ (\)(s) ->
- (a))))))))))
+ (a)))))))))))
)))
\ No newline at end of file
diff --git a/test/src/indentation.hs.syntax b/test/src/indentation.hs.syntax
new file mode 100644
index 0000000..17e596e
--- /dev/null
+++ b/test/src/indentation.hs.syntax
@@ -0,0 +1,67 @@
+_ _ wwwwwwwww wwwwwwwwwww wwwwwwwww.>
+__>
+__ wwww www wwwwwwwwww wwwwwwwww ww (ww_)wwwwwwwwwww www ww wwwwwwwwww wwww.>
+__>
+__ wwwww wwwwww "wwwwww wwwwwwwwww" wwwwwwww wwwww ww wwwwww www wwww ww>
+__ ww_wwwwww wwwwwww ww wwww wwwwwww www wwwwwwwwww. ww wwww ww wwwww wwwww.>
+__ ww wwwww wwwwwww www wwwww wwww wwwwwwww wwwwwwwwwww (w.w. ww ww wwww
wwww>
+__ www www ww w wwww ww wwww wwwwwwwww wwwwwww. wwww ww wwwwwwww wwww ww>
+__ wwwwwwww wwww wwww wwwwwww ww wwwww w www www)_>
+wwwwww wwwwwwwwwww wwwww>
+>
+wwwwww www.www>
+wwwwww www.www wwwwww ( www.>
+ www>
+ )>
+>
+wwwwwwww _ ww>
+ www __ wwww wwww wwww>
+ www __ wwww wwww>
+ wwww __ wwwwww wwwwwwwwww>
+ wwww __ wwwwww wwwwwwwwww>
+ wwwwwwwwww>
+ wwwwwwwwwww wwww>
+ www www _ wwww wwww>
+ wwww __ wwwwww wwwwwwwwww>
+ www _ wwww>
+ www _>
+ wwww>
+ wwww www __ wwwwww wwwwwwwwww>
+>
+wwwwwwwww _ __ wwwwww wwwwwwwwww>
+ ww www __ wwww>
+ ww www __ wwww __ wwww wwwww ww www>
+ www __ wwww wwwww ww www>
+>
+wwwwwwwwwwww w w _ www w w>
+ wwwww __ wwwwww wwwwwwwwww>
+ www _ www www __ wwwwwwww>
+ www _ wwww wwww __ wwww wwwww ww www>
+ wwwww __ wwwwww wwwwwwwwww>
+ www w _ wwww __ wwwwwwww>
+ www _ wwww __ wwww wwwww ww www>
+>
+wwwwww w w _ www>
+ wwww _ wwww>
+ wwwwww w _ wwww>
+ ww>
+ wwwwwww wwww>
+>
+wwwwwwwwwwww www www _>
+ www _www _ www>
+ _www _ www>
+ ww www>
+>
+wwwwwww wwwwww _ wwww wwwwww ww>
+ wwwwwww __ "">
+ wwww wwww __ wwww>
+>
+wwwwwwwwwww _ _wwww>
+ wwwwwww __ "">
+ wwww wwww __ wwww>
+>
+wwwwwww w wwwwwww _ w _>
+ "" "">
+ "">
+wwwwwww w (wwww w) _ w _ _w __>
+ w>
- [nongnu] elpa/haskell-tng-mode 1c68e79 381/385: requires emacs 27, (continued)
- [nongnu] elpa/haskell-tng-mode 1c68e79 381/385: requires emacs 27, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 55d8e69 385/385: upgrade hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 97e4a66 379/385: bump hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3870bf1 367/385: time to remove the cabal v2- prefixes, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 47f1f9f 180/385: lex CONSYM correctly, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 9bc086a 187/385: easier install, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 4f40db3 218/385: fast-tags is stack compatible by default, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 59640ce 234/385: cleanups thanks to MELPA review, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 35d3830 306/385: cache improvements, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode c0b1b6b 301/385: change the compile-always-ask default, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 907c8fa 153/385: ImplicitParams indentation,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode ca00f1f 183/385: thot, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 611711a 208/385: address melpa review, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 89c5c80 223/385: improve smartparens workaround, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e270647 228/385: more robust calls to hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ad5967b 236/385: simpler installation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 599d4f0 283/385: import symbol at point, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 9b334f7 275/385: ghcflags, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f221f95 173/385: introduce types and constraints to the grammar, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ae1d399 268/385: backslashes are only keywords when used in lambdas, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1d74d5f 279/385: backslash bughunting, ELPA Syncer, 2021/10/06