[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode fdaaf38 148/385: indent after "in"
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode fdaaf38 148/385: indent after "in" |
Date: |
Tue, 5 Oct 2021 23:59:19 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit fdaaf38c3e8f0a805f9759c834b439b98748321e
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
indent after "in"
---
haskell-tng-smie.el | 2 +-
test/haskell-tng-indent-test.el | 1 -
test/src/indentation.hs | 5 +++++
test/src/indentation.hs.append.indent | 12 +++++++++++-
test/src/indentation.hs.insert.indent | 12 +++++++++++-
test/src/indentation.hs.layout | 7 ++++++-
test/src/indentation.hs.lexer | 7 ++++++-
test/src/indentation.hs.reindent | 12 +++++++++++-
test/src/indentation.hs.sexps | 7 ++++++-
9 files changed, 57 insertions(+), 8 deletions(-)
diff --git a/haskell-tng-smie.el b/haskell-tng-smie.el
index 1c48b8b..1eaae2d 100644
--- a/haskell-tng-smie.el
+++ b/haskell-tng-smie.el
@@ -162,7 +162,7 @@ information, to aid in the creation of new rules."
(:after
(pcase arg
- ((or "let" "do" "=") 2)
+ ((or "let" "do" "=" "in") 2)
("where" (if (smie-rule-parent-p "module") 0 2))
))
diff --git a/test/haskell-tng-indent-test.el b/test/haskell-tng-indent-test.el
index f04d199..e230359 100644
--- a/test/haskell-tng-indent-test.el
+++ b/test/haskell-tng-indent-test.el
@@ -13,7 +13,6 @@
"test/haskell-tng-testutils.el")
;; TODO case statements
-;; TODO let / in
;; TODO LambdaCase
;; TODO coproduct definitions, the | should align with =
;; TODO lists, records, tuples
diff --git a/test/src/indentation.hs b/test/src/indentation.hs
index 3ac38de..4b1e52a 100644
--- a/test/src/indentation.hs
+++ b/test/src/indentation.hs
@@ -40,3 +40,8 @@ nested_where a b = foo a b
where -- manual correction
gaz a = blah -- indented
faz = blah -- same level as gaz
+
+let_in a b = let blah = bloo
+ wobble _ = fish
+ in
+ flibble blah
diff --git a/test/src/indentation.hs.append.indent
b/test/src/indentation.hs.append.indent
index 57e8c5b..fdc3540 100644
--- a/test/src/indentation.hs.append.indent
+++ b/test/src/indentation.hs.append.indent
@@ -83,4 +83,14 @@ v
faz = blah -- same level as gaz
1 2 v
-1 2 v
\ No newline at end of file
+1 2 v
+let_in a b = let blah = bloo
+1 v
+ wobble _ = fish
+1 v
+ in
+2 1 v 3
+ flibble blah
+v 2 1 3
+
+v 1 2 3
\ No newline at end of file
diff --git a/test/src/indentation.hs.insert.indent
b/test/src/indentation.hs.insert.indent
index d73738c..a834e52 100644
--- a/test/src/indentation.hs.insert.indent
+++ b/test/src/indentation.hs.insert.indent
@@ -81,4 +81,14 @@ nested_where a b = foo a b
gaz a = blah -- indented
1 2 v
faz = blah -- same level as gaz
-1 2 v
\ No newline at end of file
+1 2 v
+
+2 3 v 1
+let_in a b = let blah = bloo
+1 v
+ wobble _ = fish
+2 1 v
+ in
+2 1 v 3
+ flibble blah
+v 2 1 3
\ No newline at end of file
diff --git a/test/src/indentation.hs.layout b/test/src/indentation.hs.layout
index 62e1582..6d190ec 100644
--- a/test/src/indentation.hs.layout
+++ b/test/src/indentation.hs.layout
@@ -40,4 +40,9 @@ module Indentation where
where -- manual correction
{gaz a = blah -- indented
;faz = blah -- same level as gaz
-}}}
\ No newline at end of file
+
+}};let_in a b = let {blah = bloo
+ ;wobble _ = fish
+ }in
+ flibble blah
+}
\ No newline at end of file
diff --git a/test/src/indentation.hs.lexer b/test/src/indentation.hs.lexer
index ccc3bbb..1fc5ad9 100644
--- a/test/src/indentation.hs.lexer
+++ b/test/src/indentation.hs.lexer
@@ -40,4 +40,9 @@ where
where
{ VARID VARID = VARID
; VARID = VARID
-} } }
+
+} } ; VARID VARID VARID = let { VARID = VARID
+; VARID _ = VARID
+} in
+VARID VARID
+}
diff --git a/test/src/indentation.hs.reindent b/test/src/indentation.hs.reindent
index 27ddfec..e9b782c 100644
--- a/test/src/indentation.hs.reindent
+++ b/test/src/indentation.hs.reindent
@@ -81,4 +81,14 @@ v 1
1 2 v
gaz a = blah -- indented
v 2 1
- faz = blah -- same level as gaz
\ No newline at end of file
+ faz = blah -- same level as gaz
+2 3 v 1
+
+v 2 3 1
+let_in a b = let blah = bloo
+v 2 1
+ wobble _ = fish
+v 2 1
+ in
+2 1 v 3
+ flibble blah
\ No newline at end of file
diff --git a/test/src/indentation.hs.sexps b/test/src/indentation.hs.sexps
index b8c3810..e9fc86d 100644
--- a/test/src/indentation.hs.sexps
+++ b/test/src/indentation.hs.sexps
@@ -40,4 +40,9 @@
(where) -- manual correction
((gaz) (a) = (blah) -- indented
((faz) = (blah)) -- same level as gaz
-))))))))))
\ No newline at end of file
+
+)))(let_in) (a) (b) = (let ((blah) = (bloo)
+ ((wobble) (_) = (fish))
+ )in)
+ (flibble) (blah)))))
+)))
\ No newline at end of file
- [nongnu] elpa/haskell-tng-mode 5bdf688 211/385: better in-line indentation of parens, (continued)
- [nongnu] elpa/haskell-tng-mode 5bdf688 211/385: better in-line indentation of parens, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1cdf901 120/385: better escape syntax detection, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode c40c6e6 125/385: fix explicit export fontification bug, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 82312a2 126/385: working compilation matchers, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 794c80b 131/385: better indentation alts, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode d43fd73 141/385: more efficient indentation 'insert test, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode a830fcb 135/385: reindention test, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode aa2a0ad 146/385: prefer --enable-tests, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode a754020 144/385: indent alts will suggest based on previous <- lines, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 9023dc6 164/385: don't rely on line-based indentation rules, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode fdaaf38 148/385: indent after "in",
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode e2c60a9 161/385: prep for records, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8e4f438 184/385: don't continue indenting one liner types, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5251477 186/385: thots, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 41f1ad5 191/385: document fast-tags, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 4ec6259 185/385: prefer the lexer, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1475f31 196/385: workaround bad indentation at the end of files, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 4b0ab71 199/385: indent type signatures on separate lines, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 950d094 210/385: projectile is not core, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2df165a 229/385: electric indent locally disabled only, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 56ee2aa 231/385: completions alpha, ELPA Syncer, 2021/10/06