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

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

[nongnu] elpa/haskell-tng-mode 3449847 162/385: no need to special-case


From: ELPA Syncer
Subject: [nongnu] elpa/haskell-tng-mode 3449847 162/385: no need to special-case dollar
Date: Tue, 5 Oct 2021 23:59:23 -0400 (EDT)

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

    no need to special-case dollar
---
 haskell-tng-lexer.el          | 5 -----
 haskell-tng-smie.el           | 9 ++++-----
 test/src/indentation.hs.lexer | 6 +++---
 test/src/medley.hs.lexer      | 2 +-
 4 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/haskell-tng-lexer.el b/haskell-tng-lexer.el
index 158b9bf..8ea1a68 100644
--- a/haskell-tng-lexer.el
+++ b/haskell-tng-lexer.el
@@ -113,9 +113,6 @@ the lexer."
            ((looking-at (rx "'["))
             ;; DataKinds
             (null (goto-char (+ (point) 1))))
-           ((looking-at (rx symbol-start "$" symbol-end))
-            ;; special handling of these operators
-            (haskell-tng-lexer:last-match))
            ((looking-at haskell-tng:regexp:kindsym)
             ;; caveat: doesn't include typelevel lists, see fast-syntax
             (haskell-tng-lexer:last-match nil "KINDSYM"))
@@ -179,8 +176,6 @@ the lexer."
                ;; non-trivial inversion
                (goto-char (- (point) 1))
                (haskell-tng-lexer:backward-token))
-              ((looking-back (rx symbol-start "$" symbol-end) lbp 't)
-               (haskell-tng-lexer:last-match 'reverse))
               ((looking-back haskell-tng:regexp:kindsym lbp 't)
                (haskell-tng-lexer:last-match 'reverse "KINDSYM"))
               ((looking-back haskell-tng:regexp:kindid lbp 't)
diff --git a/haskell-tng-smie.el b/haskell-tng-smie.el
index c7d4407..5e86037 100644
--- a/haskell-tng-smie.el
+++ b/haskell-tng-smie.el
@@ -67,7 +67,6 @@
       (infixexp
        (id ":" infixexp) ;; keyword infix
        (id "':" infixexp) ;; DataKinds
-       (id "$" infixexp) ;; special case
        (id "SYMID" infixexp))
 
       (adt
@@ -204,7 +203,7 @@ information, to aid in the creation of new rules."
 
     (:list-intro
      (pcase arg
-       ((or "<-" "$" "SYMID") t)
+       ((or "<-" "SYMID") t)
        ("=" (not (smie-rule-parent-p "data")))
        ))
 
@@ -219,7 +218,7 @@ information, to aid in the creation of new rules."
                         "where" "let" "do" "of"))
               2))
        ("," (smie-rule-separator method))
-       ((or "$" "SYMID")
+       ((or "SYMID")
         (if (smie-rule-hanging-p) 2 (smie-rule-parent)))
        ))
 
@@ -235,7 +234,7 @@ information, to aid in the creation of new rules."
        ;;
        ;; blah = bloo where
        ;;               bloo = blu
-       ((or "where" "let" "do" "case" "->" "$" "SYMID")
+       ((or "where" "let" "do" "case" "->" "SYMID")
         (smie-rule-parent))
        ("\\case" ;; LambdaCase
         (smie-rule-parent))
@@ -247,7 +246,7 @@ information, to aid in the creation of new rules."
         (when (smie-rule-hanging-p)
           (smie-rule-parent)))
        ("," (smie-rule-separator method))
-       (_ (when (smie-rule-parent-p "$" "SYMID")
+       (_ (when (smie-rule-parent-p "SYMID")
             (smie-rule-parent)))
        ))
 
diff --git a/test/src/indentation.hs.lexer b/test/src/indentation.hs.lexer
index 68e0020..97aadd9 100644
--- a/test/src/indentation.hs.lexer
+++ b/test/src/indentation.hs.lexer
@@ -62,14 +62,14 @@ VARID
 { CONID -> §
 ; CONID VARID -> VARID
 
-} ; VARID VARID CONID = VARID $
+} ; VARID VARID CONID = VARID SYMID
 § §
 §
-; VARID VARID « CONID VARID » = VARID $ \ VARID ->
+; VARID VARID « CONID VARID » = VARID SYMID \ VARID ->
 VARID
 
 ; VARID = do
-{ VARID <- VARID $ VARID VARID
+{ VARID <- VARID SYMID VARID VARID
 ; VARID SYMID
 VARID
 
diff --git a/test/src/medley.hs.lexer b/test/src/medley.hs.lexer
index 2943d14..0a2047f 100644
--- a/test/src/medley.hs.lexer
+++ b/test/src/medley.hs.lexer
@@ -147,7 +147,7 @@ CONSYM CONID « CONID » « CONID CONID »
 
 ; VARID = \case
 { CONID -> § SYMID VARID
-; CONID _ -> VARID $ §
+; CONID _ -> VARID SYMID §
 
 } ; VARID = do
 { } }



reply via email to

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