From dc4efd390adfa357d68cceb65b51958bc2345a7d Mon Sep 17 00:00:00 2001 From: Gracjan Polak Date: Wed, 30 Sep 2015 19:33:23 +0200 Subject: [PATCH 1/2] Support 'where' after any expression --- haskell-indentation.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/haskell-indentation.el b/haskell-indentation.el index 2ab49c7ae..a2cc4010c 100644 --- a/haskell-indentation.el +++ b/haskell-indentation.el @@ -987,7 +987,10 @@ parser. If parsing ends here, set indentation to left-indent." (haskell-indentation-add-indentation current-indent) (throw 'parse-end nil)) (let ((current-indent (current-column))) - (funcall parser))) + (funcall parser) + (when (equal current-token "where") + (haskell-indentation-with-starter + #'haskell-indentation-expression-layout nil)))) (defun haskell-indentation-guard () "Parse \"guard\" statement." From 819de3472c5fe28bf4e00f4802622e7f72326874 Mon Sep 17 00:00:00 2001 From: Gracjan Polak Date: Wed, 30 Sep 2015 19:34:34 +0200 Subject: [PATCH 2/2] Mark indentation test as passing --- tests/haskell-indentation-tests.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/haskell-indentation-tests.el b/tests/haskell-indentation-tests.el index 44e8c1e6a..4b05a28d3 100644 --- a/tests/haskell-indentation-tests.el +++ b/tests/haskell-indentation-tests.el @@ -556,7 +556,7 @@ foo = let ((3 0) 6 9) ((4 0) 4)) -(hindent-test "26* should parse unindented where-clause properly" " +(hindent-test "26 should parse unindented where-clause properly" " foo = do return () where