@@ -37,24 +37,12 @@ if !exists('g:haskell_indent_let')
3737 let g: haskell_indent_let = 4
3838endif
3939
40- if ! exists (' g:haskell_indent_before_where' )
41- " f x = g
42- " >>where
43- let g: haskell_indent_before_where = &shiftwidth
44- endif
45-
4640if ! exists (' g:haskell_indent_where' )
4741 " where f :: Int -> Int
4842 " >>>>>>f x = x
4943 let g: haskell_indent_where = 6
5044endif
5145
52- if ! exists (' g:haskell_indent_after_bare_where' )
53- " where
54- " >>g y = x y
55- let g: haskell_indent_after_bare_where = &shiftwidth
56- endif
57-
5846if ! exists (' g:haskell_indent_do' )
5947 " do x <- a
6048 " >>>y <- b
@@ -256,7 +244,7 @@ function! GetHaskellIndent()
256244 " >>foo
257245 "
258246 if l: prevline = ~ ' \C\<where\>\s*$'
259- return match (l: prevline , ' \S' ) + g: haskell_indent_after_bare_where
247+ return match (l: prevline , ' \S' ) + get ( g: , ' haskell_indent_after_bare_where' , & shiftwidth )
260248 endif
261249
262250 " do
@@ -416,12 +404,17 @@ function! GetHaskellIndent()
416404
417405 " in foo
418406 " where bar
407+ "
408+ " or
409+ "
410+ " foo
411+ " >>where
419412 if l: line = ~ ' \C^\s*\<where\>'
420413 if match (l: prevline , ' \C^\s\+in\s\+' ) == 0
421414 return match (l: prevline , ' in' ) - g: haskell_indent_in
422415 endif
423416
424- return match (l: prevline , ' \S' ) + g: haskell_indent_before_where
417+ return match (l: prevline , ' \S' ) + get ( g: , ' haskell_indent_before_where' , & shiftwidth )
425418 endif
426419
427420 " let x = 1
0 commit comments