[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 8b5a4d4 177/385: improve indentation test
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 8b5a4d4 177/385: improve indentation tests |
Date: |
Tue, 5 Oct 2021 23:59:26 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 8b5a4d4cc23138d8fc118a8bd74a0c820d12873d
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
improve indentation tests
---
test/haskell-tng-indent-test.el | 1 +
test/src/indentation.hs | 14 ++++++++++----
test/src/indentation.hs.append.indent | 32 +++++++++++++++++++++----------
test/src/indentation.hs.insert.indent | 32 +++++++++++++++++++++----------
test/src/indentation.hs.layout | 14 ++++++++++----
test/src/indentation.hs.lexer | 10 ++++++++--
test/src/indentation.hs.reindent | 36 +++++++++++++++++++++++------------
test/src/indentation.hs.sexps | 14 ++++++++++----
test/src/indentation.hs.syntax | 12 +++++++++---
9 files changed, 116 insertions(+), 49 deletions(-)
diff --git a/test/haskell-tng-indent-test.el b/test/haskell-tng-indent-test.el
index b2fdb09..4c0e51c 100644
--- a/test/haskell-tng-indent-test.el
+++ b/test/haskell-tng-indent-test.el
@@ -15,6 +15,7 @@
;; FIXME implement more indentation rules
;;
;; TODO multiline type signatures
+;; TODO user config for typesig preference (incompatible versions)
;; TODO ImplicitParams in type signatures (without parens)
;; TODO if/then/else
diff --git a/test/src/indentation.hs b/test/src/indentation.hs
index c962b82..18a7ee3 100644
--- a/test/src/indentation.hs
+++ b/test/src/indentation.hs
@@ -122,15 +122,21 @@ tuples2 = (
tuples3 = ( foo ,
bar )
-types1 :: a -> b -> c
+typesig :: a -> b -> c
+
+types1 ::
+ Monad m
+ => a
+ -> b
+ -> c
types2 ::
- a
+ ( Monad m )
+ => a
-> b
-> c
-types3 ::
- Monad m
+types3 :: (Monad m, MemberLogger m)
=> a
-> b
-> c
diff --git a/test/src/indentation.hs.append.indent
b/test/src/indentation.hs.append.indent
index 035ccf8..777e1ee 100644
--- a/test/src/indentation.hs.append.indent
+++ b/test/src/indentation.hs.append.indent
@@ -246,32 +246,44 @@ tuples3 = ( foo ,
v 1
v 1
-types1 :: a -> b -> c
+typesig :: a -> b -> c
v
v
-types2 ::
+types1 ::
1 v
- a
+ Monad m
2 v 1
+ => a
+1 v 2
-> b
v 1 2
-> c
v 1 2
v 1 2
-types3 ::
+types2 ::
1 v
- Monad m
-2 v 1
+ ( Monad m )
+2 v1
=> a
-1 v 2
+1 v2
-> b
-v 1 2
+v 12
-> c
-v 1 2
+v 12
-v 1 2
+v 12
+types3 :: (Monad m, MemberLogger m)
+1 v
+ => a
+1 v
+ -> b
+v 1
+ -> c
+v 1
+
+v 1
types4 :: Monad m
1 v
=> (?log :: HasLogger m)
diff --git a/test/src/indentation.hs.insert.indent
b/test/src/indentation.hs.insert.indent
index 5ee213d..cc61e7d 100644
--- a/test/src/indentation.hs.insert.indent
+++ b/test/src/indentation.hs.insert.indent
@@ -246,32 +246,44 @@ tuples3 = ( foo ,
v 1
v 1
-types1 :: a -> b -> c
+typesig :: a -> b -> c
v
v
-types2 ::
+types1 ::
1 v
- a
+ Monad m
2 v 1
+ => a
+1 v 2
-> b
2 1 v
-> c
v 1 2
v 1 2
-types3 ::
-1 v
- Monad m
-2 v 1
+types2 ::
+2 1 v
+ ( Monad m )
+2 v1
=> a
-1 v 2
+1 v2
+ -> b
+2 13 v
+ -> c
+v 12
+
+v 12
+types3 :: (Monad m, MemberLogger m)
+2 1 v
+ => a
+1 v
-> b
2 1 v
-> c
-v 1 2
+v 1
-v 1 2
+v 1
types4 :: Monad m
2 1 v
=> (?log :: HasLogger m)
diff --git a/test/src/indentation.hs.layout b/test/src/indentation.hs.layout
index 4eae865..25f1b7b 100644
--- a/test/src/indentation.hs.layout
+++ b/test/src/indentation.hs.layout
@@ -122,15 +122,21 @@ module Indentation where
;tuples3 = ( foo ,
bar )
-;types1 :: a -> b -> c
+;typesig :: a -> b -> c
+
+;types1 ::
+ Monad m
+ => a
+ -> b
+ -> c
;types2 ::
- a
+ ( Monad m )
+ => a
-> b
-> c
-;types3 ::
- Monad m
+;types3 :: (Monad m, MemberLogger m)
=> a
-> b
-> c
diff --git a/test/src/indentation.hs.lexer b/test/src/indentation.hs.lexer
index 065623e..85047a2 100644
--- a/test/src/indentation.hs.lexer
+++ b/test/src/indentation.hs.lexer
@@ -125,12 +125,18 @@ VARID »
; VARID :: VARID -> VARID -> VARID
; VARID ::
-VARID
+CONID VARID
+=> VARID
-> VARID
-> VARID
; VARID ::
-CONID VARID
+« CONID VARID »
+=> VARID
+-> VARID
+-> VARID
+
+; VARID :: « CONID VARID , CONID VARID »
=> VARID
-> VARID
-> VARID
diff --git a/test/src/indentation.hs.reindent b/test/src/indentation.hs.reindent
index 14fcf7b..2219848 100644
--- a/test/src/indentation.hs.reindent
+++ b/test/src/indentation.hs.reindent
@@ -247,32 +247,44 @@ tuples3 = ( foo ,
v 1
v 1
-types1 :: a -> b -> c
+typesig :: a -> b -> c
v
v 1
-types2 ::
+types1 ::
2 1 v
- a
-v 1 2
+ Monad m
+2 v 1
+ => a
+1 v 2
-> b
1 v 2
-> c
v 1 2
-v 2 1
-types3 ::
+v 21 3
+types2 ::
2 1 v
- Monad m
-2 v 1
+ ( Monad m )
+2 v1
=> a
-1 v 2
+1 v2
-> b
-1 v 2
+1 v2
-> c
-v 1 2
+v 12
+
+v 12
+types3 :: (Monad m, MemberLogger m)
+2 1 v
+ => a
+1 v
+ -> b
+1 v
+ -> c
+v 1
-v 2 3 1
+v 2 1
types4 :: Monad m
2 1 v
=> (?log :: HasLogger m)
diff --git a/test/src/indentation.hs.sexps b/test/src/indentation.hs.sexps
index 2d8db03..0df94ee 100644
--- a/test/src/indentation.hs.sexps
+++ b/test/src/indentation.hs.sexps
@@ -122,15 +122,21 @@
((tuples3) = ( (foo) ,
(bar) ))
-((types1) :: (a) -> (b) -> (c))
+((typesig) :: (a) -> (b) -> (c))
+
+((types1) ::
+ (Monad) (m)
+ => (a)
+ -> (b)
+ -> (c))
((types2) ::
- (a)
+ ( (Monad) (m) )
+ => (a)
-> (b)
-> (c))
-((types3) ::
- (Monad) (m)
+((types3) :: ((Monad) (m), (MemberLogger) (m))
=> (a)
-> (b)
-> (c))
diff --git a/test/src/indentation.hs.syntax b/test/src/indentation.hs.syntax
index 4e75ba8..40e2ef0 100644
--- a/test/src/indentation.hs.syntax
+++ b/test/src/indentation.hs.syntax
@@ -122,15 +122,21 @@ wwwwwww _ (>
wwwwwww _ ( www .>
www )>
>
-wwwwww __ w __ w __ w>
+wwwwwww __ w __ w __ w>
>
wwwwww __>
- w>
+ wwwww w>
+ __ w>
__ w>
__ w>
>
wwwwww __>
- wwwww w>
+ ( wwwww w )>
+ __ w>
+ __ w>
+ __ w>
+>
+wwwwww __ (wwwww w. wwwwwwwwwwww w)>
__ w>
__ w>
__ w>
- [nongnu] elpa/haskell-tng-mode 50b53d3 114/385: tng compilation tests, (continued)
- [nongnu] elpa/haskell-tng-mode 50b53d3 114/385: tng compilation tests, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 36ece6d 117/385: low hanging fruit, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 489e4c9 124/385: document explicit export fontification bug, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 91a1d08 136/385: creating small scenarios for indentation specs, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ec39a64 133/385: improvements to indentation alts and compilation info, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f67557b 142/385: fix a layout corner case, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 20f4091 152/385: support dollars in indentation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 0d5e020 151/385: support LambdaCase, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 08a3946 163/385: records indentation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3449847 162/385: no need to special-case dollar, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8b5a4d4 177/385: improve indentation tests,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode cb801b4 015/385: moar multiline type search, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode de48840 030/385: multiline import anchors, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5c50be0 044/385: remove redundant TODOs, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 174c63b 046/385: laying the foundations for SMIE, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 97ce717 058/385: improve the testing, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2a2afee 064/385: cache invalidation and tests for layout invalidation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3ca869f 067/385: code reorganisation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 0ffb885 071/385: a thought, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 79aeb82 076/385: most of the grammar, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 7eaef51 078/385: optimisation in the sexp test, ELPA Syncer, 2021/10/06