Skip to content

Weird bug that happens with code snippets in comments when a GHC Pragma #4968

Description

@anshwad10
Screen.Recording.2026-06-10.at.4.28.16.PM.mov

Your environment

Which OS do you use?

macOS

Which version of GHC do you use and how did you install it?
9.14.1 from ghcup
How is your project built (alternative: link to the project)?
Which LSP client (editor/plugin) do you use?
vscode-haskell
Which version of HLS do you use and how did you install it?
2.13.0.0 from ghcup
Have you configured HLS in any way (especially: a hie.yaml file)?
I dont think so?

Steps to reproduce

Create a new haskell file, put {-# OPTIONS_GHC -O1 #-} at the top, and put any code snippet in a comment, and try to run it

Expected behaviour

It should show the result of the code in a comment

Actual behaviour

It shows a weird bug

Debug information

idk

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: hls-eval-plugintype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions