Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect code highlighting #1115

Open
ViciousDoormat opened this issue Jul 27, 2024 · 2 comments
Open

Incorrect code highlighting #1115

ViciousDoormat opened this issue Jul 27, 2024 · 2 comments

Comments

@ViciousDoormat
Copy link

ViciousDoormat commented Jul 27, 2024

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))

image

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.

@fendor
Copy link
Collaborator

fendor commented Jul 29, 2024

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.

@fendor
Copy link
Collaborator

fendor commented Jul 29, 2024

Perhaps this issue? JustusAdam/language-haskell#179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants