Skip to content

List comprehensions are treated as quasiquotes #3122

Open
@TheBFL

Description

@TheBFL

Your environment

Which OS do you use?

  • WSL 2 (Ubuntu)

Which version of GHC do you use and how did you install it?

  • 9.0.2 ghcup

Which LSP client (editor/plugin) do you use?

  • VSCode/Haskell

Which version of HLS do you use and how did you install it?

  • 1.7.0.0 from ghcup.

Have you configured HLS in any way (especially: a hie.yaml file)?

  • No.

Steps to reproduce

Create a haskell file in vscode, with the contents:

main = print [x| x <- [1..10]]

the same behavior occurs even when {-#LANGUAGE NoQuasiQuotes#-} is added.

Expected behaviour

HLS treats this as a list comprehension, and displays the appropriate suggestions (such as "redundant list comprehension"), when quasiquotes are disabled.

Actual behaviour

HLS gives an error when there is no space before the | in the list comprehension, claiming that it is an unterminated quasiquotation at end of input when QuasiQuotes are not enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions