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

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

[nongnu] elpa/haskell-tng-mode 73ba85d 270/385: nicer indentation for si


From: ELPA Syncer
Subject: [nongnu] elpa/haskell-tng-mode 73ba85d 270/385: nicer indentation for single parameter type sigs
Date: Tue, 5 Oct 2021 23:59:45 -0400 (EDT)

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

    nicer indentation for single parameter type sigs
---
 haskell-tng-smie.el                   |  3 ++-
 test/src/indentation.hs               |  2 ++
 test/src/indentation.hs.append.indent |  4 ++++
 test/src/indentation.hs.faceup        |  2 ++
 test/src/indentation.hs.imenu         | 11 ++++++-----
 test/src/indentation.hs.insert.indent |  4 ++++
 test/src/indentation.hs.layout        |  2 ++
 test/src/indentation.hs.lexer         |  2 ++
 test/src/indentation.hs.sexps         |  2 ++
 test/src/indentation.hs.syntax        |  2 ++
 10 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/haskell-tng-smie.el b/haskell-tng-smie.el
index df2badb..11052e7 100644
--- a/haskell-tng-smie.el
+++ b/haskell-tng-smie.el
@@ -244,7 +244,8 @@ information, to aid in the creation of new rules."
            ((and (member parent '("::" "=>"))
                  (or (not (member "=>" prevline))
                      (equal "=>" (car prevline)))
-                 (not (haskell-tng--smie-prev-line-blank-p)))
+                 (not (haskell-tng--smie-prev-line-blank-p))
+                 (not (equal "::" (cadr (reverse prevline)))))
             "=>")
 
            ((haskell-tng--smie-search-prev-line
diff --git a/test/src/indentation.hs b/test/src/indentation.hs
index 7429bd1..1f4286b 100644
--- a/test/src/indentation.hs
+++ b/test/src/indentation.hs
@@ -137,6 +137,8 @@ tuples3 = ( foo ,
 
 typesig :: a -> b -> c
 
+types0 :: String
+
 types1 ::
      Monad m
   => a
diff --git a/test/src/indentation.hs.append.indent 
b/test/src/indentation.hs.append.indent
index 7df019e..aa8964a 100644
--- a/test/src/indentation.hs.append.indent
+++ b/test/src/indentation.hs.append.indent
@@ -276,6 +276,10 @@ typesig :: a -> b -> c
 v
 
 v
+types0 :: String
+v
+
+v
 types1 ::
 1    v
      Monad m
diff --git a/test/src/indentation.hs.faceup b/test/src/indentation.hs.faceup
index 8975357..dcd8876 100644
--- a/test/src/indentation.hs.faceup
+++ b/test/src/indentation.hs.faceup
@@ -137,6 +137,8 @@ tuples3 «:haskell-tng-keyword-face:=» 
«:haskell-tng-keyword-face:(» foo «:h
 
 typesig «:haskell-tng-keyword-face:::»«:haskell-tng-type-face: a 
»«:haskell-tng-keyword-face:->»«:haskell-tng-type-face: b 
»«:haskell-tng-keyword-face:->»«:haskell-tng-type-face: c
 »
+types0 «:haskell-tng-keyword-face:::»«:haskell-tng-type-face: String
+»
 types1 «:haskell-tng-keyword-face:::»«:haskell-tng-type-face:
      Monad m
   »«:haskell-tng-keyword-face:=>»«:haskell-tng-type-face: a
diff --git a/test/src/indentation.hs.imenu b/test/src/indentation.hs.imenu
index 19788fa..99f42de 100644
--- a/test/src/indentation.hs.imenu
+++ b/test/src/indentation.hs.imenu
@@ -19,8 +19,9 @@
  ("tuples2" . 2379)
  ("tuples3" . 2406)
  ("typesig" . 2443)
- ("types1" . 2467)
- ("types2" . 2512)
- ("types2b" . 2570)
- ("types3" . 2631)
- ("types_short" . 2731))
+ ("types0" . 2467)
+ ("types1" . 2485)
+ ("types2" . 2530)
+ ("types2b" . 2588)
+ ("types3" . 2649)
+ ("types_short" . 2749))
diff --git a/test/src/indentation.hs.insert.indent 
b/test/src/indentation.hs.insert.indent
index b0919ee..766257c 100644
--- a/test/src/indentation.hs.insert.indent
+++ b/test/src/indentation.hs.insert.indent
@@ -276,6 +276,10 @@ typesig :: a -> b -> c
 v
 
 v
+types0 :: String
+v
+
+v
 types1 ::
 1    v
      Monad m
diff --git a/test/src/indentation.hs.layout b/test/src/indentation.hs.layout
index d975bbf..b098dca 100644
--- a/test/src/indentation.hs.layout
+++ b/test/src/indentation.hs.layout
@@ -137,6 +137,8 @@ module Indentation where
 
 ;typesig :: a -> b -> c
 
+;types0 :: String
+
 ;types1 ::
      Monad m
   => a
diff --git a/test/src/indentation.hs.lexer b/test/src/indentation.hs.lexer
index a244df2..0f0fc93 100644
--- a/test/src/indentation.hs.lexer
+++ b/test/src/indentation.hs.lexer
@@ -137,6 +137,8 @@ VARID »
 
 ; VARID :: VARID => VARID => VARID
 
+; VARID :: CONID
+
 ; VARID ::
 CONID VARID
 => VARID
diff --git a/test/src/indentation.hs.sexps b/test/src/indentation.hs.sexps
index 1e6be1e..dab3618 100644
--- a/test/src/indentation.hs.sexps
+++ b/test/src/indentation.hs.sexps
@@ -137,6 +137,8 @@
 
 ((typesig) :: (a) -> (b) -> (c))
 
+((types0) :: (String))
+
 ((types1) ::
      (Monad) (m)
   => (a)
diff --git a/test/src/indentation.hs.syntax b/test/src/indentation.hs.syntax
index 94efffd..efa432e 100644
--- a/test/src/indentation.hs.syntax
+++ b/test/src/indentation.hs.syntax
@@ -137,6 +137,8 @@ wwwwwww _ ( www .>
 >
 wwwwwww __ w __ w __ w>
 >
+wwwwww __ wwwwww>
+>
 wwwwww __>
      wwwww w>
   __ w>



reply via email to

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