neovimhaskell / haskell-vim

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

Incorrect highlighting of type annotated monadic bound variable #67

Open andrewthad opened 8 years ago

andrewthad commented 8 years ago

If you have a program that looks like this:

myFunc :: IO ()
myFunc = do
  x :: Int <- readLn
  print x

Then the first occurrence of x ends up being highlighted like it's a function declaration.

raichoo commented 8 years ago

Yep, that is known. I don't see a way to fix this other than putting parentheses around this like so:

(x :: Int) <- readLn

VimL's ability to highlight based on context is very limited.