emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/haskell-tng-mode be39ede 258/385: if/then/else indentation


From: ELPA Syncer
Subject: [nongnu] elpa/haskell-tng-mode be39ede 258/385: if/then/else indentation test
Date: Tue, 5 Oct 2021 23:59:42 -0400 (EDT)

branch: elpa/haskell-tng-mode
commit be39ede788f180260d0c5bf6831c838cc9cb2878
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>

    if/then/else indentation test
---
 test/src/indentation.hs               |  5 +++++
 test/src/indentation.hs.append.indent | 10 ++++++++++
 test/src/indentation.hs.faceup        |  5 +++++
 test/src/indentation.hs.imenu         | 25 +++++++++++++------------
 test/src/indentation.hs.insert.indent | 10 ++++++++++
 test/src/indentation.hs.layout        |  7 ++++++-
 test/src/indentation.hs.sexps         | 11 ++++++++---
 test/src/indentation.hs.syntax        |  5 +++++
 8 files changed, 62 insertions(+), 16 deletions(-)

diff --git a/test/src/indentation.hs b/test/src/indentation.hs
index 4accd91..5cad1cf 100644
--- a/test/src/indentation.hs
+++ b/test/src/indentation.hs
@@ -73,6 +73,11 @@ not_dollars = do
   shouldGoHere <$>
     here
 
+logic a =
+  if a > 0
+  then a
+  else -a
+
 data Wibble = Wibble Int
             | Wobble Int
             | Vibble Int
diff --git a/test/src/indentation.hs.append.indent 
b/test/src/indentation.hs.append.indent
index 768308f..88c37c0 100644
--- a/test/src/indentation.hs.append.indent
+++ b/test/src/indentation.hs.append.indent
@@ -148,6 +148,16 @@ not_dollars = do
 2 v 1    3
 
 1 v 2    3
+logic a =
+1 v
+  if a > 0
+1 v
+  then a
+1 v
+  else -a
+1 v
+
+1 v
 data Wibble = Wibble Int
 1           v
             | Wobble Int
diff --git a/test/src/indentation.hs.faceup b/test/src/indentation.hs.faceup
index 05c55b4..d75a2d6 100644
--- a/test/src/indentation.hs.faceup
+++ b/test/src/indentation.hs.faceup
@@ -73,6 +73,11 @@ not_dollars «:haskell-tng-keyword-face:=» 
«:haskell-tng-keyword-face:do»
   shouldGoHere <$>
     here
 
+logic a «:haskell-tng-keyword-face:=»
+  «:haskell-tng-keyword-face:if» a > 0
+  «:haskell-tng-keyword-face:then» a
+  «:haskell-tng-keyword-face:else» -a
+
 «:haskell-tng-keyword-face:data»«:haskell-tng-type-face: Wibble 
»«:haskell-tng-keyword-face:=» «:haskell-tng-conid-face:Wibble» 
«:haskell-tng-conid-face:Int»
             «:haskell-tng-keyword-face:|» «:haskell-tng-conid-face:Wobble» 
«:haskell-tng-conid-face:Int»
             «:haskell-tng-keyword-face:|» «:haskell-tng-conid-face:Vibble» 
«:haskell-tng-conid-face:Int»
diff --git a/test/src/indentation.hs.imenu b/test/src/indentation.hs.imenu
index 49205d8..d9d65e3 100644
--- a/test/src/indentation.hs.imenu
+++ b/test/src/indentation.hs.imenu
@@ -10,15 +10,16 @@
  ("lambda_case" . 1481)
  ("dollars" . 1540)
  ("not_dollars" . 1613)
- ("lists1" . 2020)
- ("lists2" . 2118)
- ("lists3" . 2144)
- ("tuples1" . 2179)
- ("tuples2" . 2283)
- ("tuples3" . 2310)
- ("typesig" . 2347)
- ("types1" . 2371)
- ("types2" . 2416)
- ("types2b" . 2474)
- ("types3" . 2535)
- ("types_short" . 2635))
+ ("logic" . 1689)
+ ("lists1" . 2061)
+ ("lists2" . 2159)
+ ("lists3" . 2185)
+ ("tuples1" . 2220)
+ ("tuples2" . 2324)
+ ("tuples3" . 2351)
+ ("typesig" . 2388)
+ ("types1" . 2412)
+ ("types2" . 2457)
+ ("types2b" . 2515)
+ ("types3" . 2576)
+ ("types_short" . 2676))
diff --git a/test/src/indentation.hs.insert.indent 
b/test/src/indentation.hs.insert.indent
index ffc288c..66a7abb 100644
--- a/test/src/indentation.hs.insert.indent
+++ b/test/src/indentation.hs.insert.indent
@@ -148,6 +148,16 @@ not_dollars = do
 2 v 1    3
 
 v 1 2    3
+logic a =
+1 v
+  if a > 0
+2 1      v
+  then a
+2 1    v
+  else -a
+1 v
+
+v 1
 data Wibble = Wibble Int
 1           v
             | Wobble Int
diff --git a/test/src/indentation.hs.layout b/test/src/indentation.hs.layout
index 27e0ac4..b3b3718 100644
--- a/test/src/indentation.hs.layout
+++ b/test/src/indentation.hs.layout
@@ -73,7 +73,12 @@ module Indentation where
   ;shouldGoHere <$>
     here
 
-};data Wibble = Wibble Int
+};logic a =
+  if a > 0
+  then a
+  else -a
+
+;data Wibble = Wibble Int
             | Wobble Int
             | Vibble Int
 
diff --git a/test/src/indentation.hs.sexps b/test/src/indentation.hs.sexps
index 2c4037e..6a42b01 100644
--- a/test/src/indentation.hs.sexps
+++ b/test/src/indentation.hs.sexps
@@ -73,9 +73,14 @@
   ((shouldGoHere) <$>
     (here))
 
-)data (Wibble) = (Wibble) (Int)
+)(logic) (a) =
+  (if (a) > (((0)
+  (then) (a)
+  (else) (-(a)
+
+(data (Wibble) = (Wibble) (Int)
             | (Wobble) (Int)
-            | (Vibble) (Int)
+            | (Vibble) (Int))
 
 (data (Record1) = (Record1) ({
   (fieldA) :: (String)
@@ -145,5 +150,5 @@
           ((?log) :: (HasLogger) (m)) =>
           (a) -> (b) -> (c))
 
-((types_short) :: (Foo) -> (Bar))))))))))))))
+((types_short) :: (Foo) -> (Bar))))))))))))))))))
 )))
\ No newline at end of file
diff --git a/test/src/indentation.hs.syntax b/test/src/indentation.hs.syntax
index 04233b1..594b67d 100644
--- a/test/src/indentation.hs.syntax
+++ b/test/src/indentation.hs.syntax
@@ -73,6 +73,11 @@ wwwwwwwwwww _ ww>
   wwwwwwwwwwww ___>
     wwww>
 >
+wwwww w _>
+  ww w _ w>
+  wwww w>
+  wwww _w>
+>
 wwww wwwwww _ wwwwww www>
             _ wwwwww www>
             _ wwwwww www>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]