summaryrefslogtreecommitdiffstats
path: root/indent/haskell.vim
diff options
context:
space:
mode:
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)