branch: elpa/haskell-tng-mode commit d3a6a2278cb39a5dc53226860e7e898d2c3a2659 Author: Tseen She <ts33n....@gmail.com> Commit: Tseen She <ts33n....@gmail.com>
no todos in the test/src dir --- haskell-tng-smie.el | 7 ++++++- test/haskell-tng-indent-test.el | 7 +++++++ test/src/indentation.hs | 11 +---------- test/src/indentation.hs.append.indent | 20 +------------------- test/src/indentation.hs.insert.indent | 20 +------------------- test/src/indentation.hs.layout | 11 +---------- test/src/indentation.hs.lexer | 9 --------- test/src/indentation.hs.reindent | 22 ++-------------------- test/src/indentation.hs.sexps | 11 +---------- 9 files changed, 20 insertions(+), 98 deletions(-) diff --git a/haskell-tng-smie.el b/haskell-tng-smie.el index d056b21..1c48b8b 100644 --- a/haskell-tng-smie.el +++ b/haskell-tng-smie.el @@ -174,7 +174,10 @@ information, to aid in the creation of new rules." )) (defconst haskell-tng-smie:return - '(newline-and-indent newline) + '(comment-indent-new-line + newline-and-indent + newline + haskell-tng-smie:debug-newline) "Users with custom newlines should add their command.") (defvar-local haskell-tng-smie:indentations nil) @@ -224,6 +227,8 @@ current line." (when-let (new (haskell-tng-smie:relevant-alts (point-at-eol) (< it 0))) (setq indents (append new indents))))) + ;; TODO if this list is empty, return current+2 + (-distinct indents))) (defun haskell-tng-smie:relevant-alts (bound before) diff --git a/test/haskell-tng-indent-test.el b/test/haskell-tng-indent-test.el index 6205932..f04d199 100644 --- a/test/haskell-tng-indent-test.el +++ b/test/haskell-tng-indent-test.el @@ -12,6 +12,13 @@ (require 'haskell-tng-testutils "test/haskell-tng-testutils.el") +;; TODO case statements +;; TODO let / in +;; TODO LambdaCase +;; TODO coproduct definitions, the | should align with = +;; TODO lists, records, tuples +;; TODO long type signatures vs definitions + ;; Three indentation regression tests are possible: ;; ;; 1. newline-and-indent with the rest of the file deleted (append) diff --git a/test/src/indentation.hs b/test/src/indentation.hs index 7dd8dab..3ac38de 100644 --- a/test/src/indentation.hs +++ b/test/src/indentation.hs @@ -34,18 +34,9 @@ nested_do = -- manual correction baz -- same level as bar nested_where a b = foo a b - where -- TODO 2 + where -- manual correction foo = bar baz -- indented baz = blah blah -- same level as foo where -- manual correction gaz a = blah -- indented faz = blah -- same level as gaz - --- TODO case statements --- TODO let / in - --- TODO coproduct definitions, the | should align with = - --- TODO lists, records, tuples - --- TODO long type signatures vs definitions diff --git a/test/src/indentation.hs.append.indent b/test/src/indentation.hs.append.indent index 0a56dfa..57e8c5b 100644 --- a/test/src/indentation.hs.append.indent +++ b/test/src/indentation.hs.append.indent @@ -70,7 +70,7 @@ nested_do = -- manual correction 1 2 v 3 4 nested_where a b = foo a b v - where -- TODO 2 + where -- manual correction 1 v foo = bar baz -- indented 1 v @@ -83,22 +83,4 @@ v faz = blah -- same level as gaz 1 2 v -1 2 v --- TODO case statements -1 2 v --- TODO let / in -1 2 v - -1 2 v --- TODO coproduct definitions, the | should align with = -1 2 v - -1 2 v --- TODO lists, records, tuples -1 2 v - -1 2 v --- TODO long type signatures vs definitions -1 2 v - 1 2 v \ No newline at end of file diff --git a/test/src/indentation.hs.insert.indent b/test/src/indentation.hs.insert.indent index 9042620..d73738c 100644 --- a/test/src/indentation.hs.insert.indent +++ b/test/src/indentation.hs.insert.indent @@ -70,7 +70,7 @@ nested_do = -- manual correction 1 2 v 3 4 nested_where a b = foo a b 1 v - where -- TODO 2 + where -- manual correction 1 v foo = bar baz -- indented 1 v @@ -81,22 +81,4 @@ nested_where a b = foo a b gaz a = blah -- indented 1 2 v faz = blah -- same level as gaz -1 2 v - -1 2 v --- TODO case statements -1 2 v --- TODO let / in -1 2 v - -1 2 v --- TODO coproduct definitions, the | should align with = -1 2 v - -1 2 v --- TODO lists, records, tuples -1 2 v - -1 2 v --- TODO long type signatures vs definitions 1 2 v \ No newline at end of file diff --git a/test/src/indentation.hs.layout b/test/src/indentation.hs.layout index 2c5f03d..62e1582 100644 --- a/test/src/indentation.hs.layout +++ b/test/src/indentation.hs.layout @@ -34,19 +34,10 @@ module Indentation where ;baz -- same level as bar }};nested_where a b = foo a b - where -- TODO 2 + where -- manual correction {foo = bar baz -- indented ;baz = blah blah -- same level as foo where -- manual correction {gaz a = blah -- indented ;faz = blah -- same level as gaz - --- TODO case statements --- TODO let / in - --- TODO coproduct definitions, the | should align with = - --- TODO lists, records, tuples - --- TODO long type signatures vs definitions }}} \ No newline at end of file diff --git a/test/src/indentation.hs.lexer b/test/src/indentation.hs.lexer index df70005..ccc3bbb 100644 --- a/test/src/indentation.hs.lexer +++ b/test/src/indentation.hs.lexer @@ -40,13 +40,4 @@ where where { VARID VARID = VARID ; VARID = VARID - - - - - - - - - } } } diff --git a/test/src/indentation.hs.reindent b/test/src/indentation.hs.reindent index 8906b4b..27ddfec 100644 --- a/test/src/indentation.hs.reindent +++ b/test/src/indentation.hs.reindent @@ -71,7 +71,7 @@ v 2 1 4 3 v 1 2 3 4 nested_where a b = foo a b 1 v 2 - where -- TODO 2 + where -- manual correction 1 v foo = bar baz -- indented v 1 @@ -81,22 +81,4 @@ v 1 1 2 v gaz a = blah -- indented v 2 1 - faz = blah -- same level as gaz -1 2 v - -1 2 3 v --- TODO case statements -1 2 3 v --- TODO let / in -1 2 v - -1 2 3 v --- TODO coproduct definitions, the | should align with = -1 2 v - -1 2 3 v --- TODO lists, records, tuples -1 2 v - -1 2 3 v --- TODO long type signatures vs definitions \ No newline at end of file + faz = blah -- same level as gaz \ No newline at end of file diff --git a/test/src/indentation.hs.sexps b/test/src/indentation.hs.sexps index 0611710..b8c3810 100644 --- a/test/src/indentation.hs.sexps +++ b/test/src/indentation.hs.sexps @@ -34,19 +34,10 @@ (baz) -- same level as bar )))(nested_where) (a) (b) = (foo) (a) (b) - (where) -- TODO 2 + (where) -- manual correction (((foo) = (bar) (baz) -- indented ((baz) = (blah) (blah)) -- same level as foo (where) -- manual correction ((gaz) (a) = (blah) -- indented ((faz) = (blah)) -- same level as gaz - --- TODO case statements --- TODO let / in - --- TODO coproduct definitions, the | should align with = - --- TODO lists, records, tuples - --- TODO long type signatures vs definitions )))))))))) \ No newline at end of file