neovimhaskell / haskell-vim

Custom Haskell Vimscripts
BSD 2-Clause "Simplified" License
682 stars 84 forks source link

empty where line after guard indents wrong #124

Open Kazimazi opened 3 years ago

Kazimazi commented 3 years ago
search :: Matrix [Digit] -> [Grid]
search cm
  | not (safe pm) = []
  | complete pm = [extract pm]
  | otherwise = concatMap search (expand1 pm)
  where
    pm = prune cm

Indenting the block above with Vip= would result with the faulty:

search :: Matrix [Digit] -> [Grid]
search cm
  | not (safe pm) = []
  | complete pm = [extract pm]
  | otherwise = concatMap search (expand1 pm)
where
  pm = prune cm

Either getting rid of the guards or not separating where part into multiple lines would lead to correct behavior.

seasonedfish commented 2 years ago

I have this issue too. When I type where after guards, I expect it to be indented to the level of the guards, but it isn't indented.