summaryrefslogtreecommitdiffstats
path: root/indent/haskell.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2018-02-06 11:15:01 +0800
committerAdam Stankiewicz <sheerun@sher.pl>2018-02-06 11:15:01 +0800
commit18efda3933a867dd21df483bbfeae52231783d46 (patch)
treea2af3be10f2140314656d1c2e0e53ef1a1c1b6c6 /indent/haskell.vim
parentbfc6ed9fbafc0758aaab228df70a3656368d8497 (diff)
downloadvim-polyglot-18efda3933a867dd21df483bbfeae52231783d46.tar.gz
vim-polyglot-18efda3933a867dd21df483bbfeae52231783d46.zip
Update
Diffstat (limited to 'indent/haskell.vim')
-rw-r--r--indent/haskell.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/indent/haskell.vim b/indent/haskell.vim
index 5c33e550..5a337144 100644
--- a/indent/haskell.vim
+++ b/indent/haskell.vim
@@ -296,9 +296,20 @@ function! GetHaskellIndent()
"" where foo
"" >>>>>>bar
+ ""
+ "" where foo :: Int
+ "" >>>>>>>>>>-> Int
+ ""
+ "" where foo x
+ "" >>>>>>>>|
if l:prevline =~ '\C\<where\>\s\+\S\+.*$'
if l:line =~ '^\s*[=-]>\s' && l:prevline =~ ' :: '
return match(l:prevline, ':: ')
+ elseif l:line =~ '^\s*|\s'
+ let l:s = match(l:prevline, '\C\<where\>')
+ if s:isSYN('haskellWhere', v:lnum - 1, l:s + 1)
+ return l:s + g:haskell_indent_where + g:haskell_indent_guard
+ endif
else
let l:s = match(l:prevline, '\C\<where\>')
if s:isSYN('haskellWhere', v:lnum - 1, l:s + 1)