[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 86bcd98 175/385: constraint indentation
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 86bcd98 175/385: constraint indentation |
Date: |
Tue, 5 Oct 2021 23:59:26 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 86bcd981f05270dd5bd6c2a5fb711fb1be583518
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
constraint indentation
---
haskell-tng-smie.el | 4 ++++
test/src/indentation.hs.append.indent | 14 +++++++-------
test/src/indentation.hs.insert.indent | 14 +++++++-------
test/src/indentation.hs.reindent | 6 +++---
4 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/haskell-tng-smie.el b/haskell-tng-smie.el
index 751d5fc..a7f396a 100644
--- a/haskell-tng-smie.el
+++ b/haskell-tng-smie.el
@@ -202,6 +202,9 @@ information, to aid in the creation of new rules."
(not (equal prev "}"))))
"|")
+ ((member parent '("::" "=>"))
+ "=>")
+
((equal parent "deriving")
";")
@@ -266,6 +269,7 @@ information, to aid in the creation of new rules."
(smie-rule-separator method)))
((and (or "[" "(" "{") (guard (smie-rule-hanging-p)))
(smie-rule-parent))
+ ((and "=>" (guard (not (smie-rule-sibling-p)))) 2)
("," (if (smie-rule-parent-p "::")
;; types plus record syntax confuse smie-rule-separator. This
;; heuristic works in most cases, but is not robust.
diff --git a/test/src/indentation.hs.append.indent
b/test/src/indentation.hs.append.indent
index 4218a47..035ccf8 100644
--- a/test/src/indentation.hs.append.indent
+++ b/test/src/indentation.hs.append.indent
@@ -253,7 +253,7 @@ v
types2 ::
1 v
a
-v 1
+2 v 1
-> b
v 1 2
-> c
@@ -263,9 +263,9 @@ v 1 2
types3 ::
1 v
Monad m
-v 1
+2 v 1
=> a
-v 1 2
+1 v 2
-> b
v 1 2
-> c
@@ -273,11 +273,11 @@ v 1 2
v 1 2
types4 :: Monad m
-v
+1 v
=> (?log :: HasLogger m)
-v 1
+1 v
=> a
-v 1
+1 v
-> b
v 1
-> c
@@ -285,7 +285,7 @@ v 1
v 1
types5 :: (Monad m, MonadReader Foo m) =>
-1 v
+1 v
(?log :: HasLogger m) =>
1 v
a -> b -> c
diff --git a/test/src/indentation.hs.insert.indent
b/test/src/indentation.hs.insert.indent
index 34dc432..5ee213d 100644
--- a/test/src/indentation.hs.insert.indent
+++ b/test/src/indentation.hs.insert.indent
@@ -253,7 +253,7 @@ v
types2 ::
1 v
a
-2 1 v
+2 v 1
-> b
2 1 v
-> c
@@ -263,9 +263,9 @@ v 1 2
types3 ::
1 v
Monad m
-3 1 2 v
+2 v 1
=> a
-2 1 v
+1 v 2
-> b
2 1 v
-> c
@@ -273,11 +273,11 @@ v 1 2
v 1 2
types4 :: Monad m
-2 1 v
+2 1 v
=> (?log :: HasLogger m)
-2 1 v
+1 v
=> a
-2 1 v
+1 v
-> b
2 1 v
-> c
@@ -285,7 +285,7 @@ v 1
v 1
types5 :: (Monad m, MonadReader Foo m) =>
-1 v
+2 v1
(?log :: HasLogger m) =>
1 v
a -> b -> c
diff --git a/test/src/indentation.hs.reindent b/test/src/indentation.hs.reindent
index 68d3d4b..14fcf7b 100644
--- a/test/src/indentation.hs.reindent
+++ b/test/src/indentation.hs.reindent
@@ -264,7 +264,7 @@ v 2 1
types3 ::
2 1 v
Monad m
-2 1 v
+2 v 1
=> a
1 v 2
-> b
@@ -274,7 +274,7 @@ v 1 2
v 2 3 1
types4 :: Monad m
-2 1 v
+2 1 v
=> (?log :: HasLogger m)
1 v
=> a
@@ -286,7 +286,7 @@ v 1
v 2 1
types5 :: (Monad m, MonadReader Foo m) =>
-1 v
+2 v1
(?log :: HasLogger m) =>
1 v
a -> b -> c
\ No newline at end of file
- [nongnu] elpa/haskell-tng-mode ab5252b 169/385: rearrange alts, (continued)
- [nongnu] elpa/haskell-tng-mode ab5252b 169/385: rearrange alts, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e1aba33 168/385: fix a layout bug in lists and records, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2c6c772 150/385: better WLDO indentation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3f54673 155/385: don't fontify toplevel, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 32175c0 158/385: thots, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8c2e3f7 157/385: better symid indentation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode bc5c827 160/385: tuple indentation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e0acc42 156/385: better tasty error detection, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode c211672 174/385: indentation for hanging type definition, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ef7f335 171/385: note stack compatibility, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 86bcd98 175/385: constraint indentation,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode e1c0f0a 179/385: allow indentation option to be tested, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1cceb64 182/385: cleaner tests, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b1122e4 188/385: allow users to use unsupported build tools, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode bd4ff6f 192/385: standardise on naming convention:, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3b5ac7f 190/385: package-lint, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode a227f7e 200/385: blank lines end a run of type definitions, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e4ead98 201/385: thots on prettify-symbol, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 387aa18 203/385: more efficient layout algorithm, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode bfc3841 193/385: remove bind-key dependency, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6acba95 206/385: better insertion indentation on toplevels, ELPA Syncer, 2021/10/06