vscode-haskell
vscode-haskell copied to clipboard
Incorrect code highlighting
Your environment
OS: Windows 11
Steps to reproduce
This code block gets highlighted incorrectly. The word "fold" in the type definition gets highlighted blue (as a type variable) instead of yellow. When I remove "Usable a b =>" from the definition of ListCh, it gets highlighted correctly.
data List a = No | One a | Two a (List a) deriving Show
data List_ a b = No_ | One_ a | Two_ a b
newtype ListCh a = ListCh (forall b. Usable a b => (List_ a b -> b) -> b)
fold :: (List_ a b -> b) -> List a -> b
fold a No = a No_
fold a (One x) = a (One_ x)
fold a (Two x xs) = a (Two_ x (fold a xs))
This is the whole code file (as a .txt because .hs is not supported): list.txt
Include debug information
When I add my extension logs, the message gets too long. If desired, I could add them to the issue as a file.
Hi, thank you for the bug report!
I can reproduce the issue, but I think this is issue is caused by https://github.com/JustusAdam/language-haskell. By default, this vscode-haskell plugin (and HLS) do not provide the syntax highlighting.
Perhaps this issue? https://github.com/JustusAdam/language-haskell/issues/179
Closing as likely not our fault