Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Eval plugin errors on `:seti`

Open Beginner friendly
#5,144 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Domain
devtools

Research direction

Start in the eval plugin source of haskell-language-server, looking for where the :set directive is recognised and where the unknown command message is emitted. Then reproduce on Data/Text/Lazy.hs at the linked commit of haskell/text, checking that :seti no longer produces unknown command 'seti' and that the >>> lines evaluate with OverloadedStrings in effect. Done when the setup line is accepted without the error.

Written by the indexing model from the issue text.

Description

component: hls-eval-plugin type: bug
Your environment

Which OS do you use? Up-to-date ArchLinux

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)? The project is https://github.com/haskell/text

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

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

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

Steps to reproduce
  1. Clone https://github.com/haskell/text
  2. open https://github.com/haskell/text/blob/5f948615af326db15ae1757246c4e9d532daf093/src/Data/Text/Lazy.hs#L2000
  3. trigger the eval plugin
Expected behaviour

Nothing in the file should change (meaning all >>> produce the expected output).

Actual behaviour

You get this:

-- >>> revChunks ["one", "two"]
-- Couldn't match expected type `Text' with actual type `[Char]'
-- In the expression: "two"
-- In the first argument of `revChunks', namely `["one", "two"]'
-- In the expression: revChunks ["one", "two"]
-- Couldn't match expected type `Text' with actual type `[Char]'
-- In the expression: "one"
-- In the first argument of `revChunks', namely `["one", "two"]'
-- In the expression: revChunks ["one", "two"]
--
-- >>> revChunks ["one"]
-- Couldn't match expected type `Text' with actual type `[Char]'
-- In the expression: "one"
-- In the first argument of `revChunks', namely `["one"]'
-- In the expression: revChunks ["one"]
--
-- >>> revChunks [""]
-- Couldn't match expected type `Text' with actual type `[Char]'
-- In the expression: ""
-- In the first argument of `revChunks', namely `[""]'
-- In the expression: revChunks [""]
--
-- >>> revChunks []
-- ""

(see no error on the last snippet because it doesn't use "" as a Text) and, after the setup code,
https://github.com/haskell/text/blob/5f948615af326db15ae1757246c4e9d532daf093/src/Data/Text/Lazy.hs#L305-L310
you get this added

-- unknown command 'seti'

Changing
https://github.com/haskell/text/blob/5f948615af326db15ae1757246c4e9d532daf093/src/Data/Text/Lazy.hs#L310
to

-- >>> :set -XOverloadedStrings

fixes the issue, which I think reveals that the eval plugin is simply not contemplating :seti.

Debug information
Dominant language
Haskell
Stars
3k
Forks
469
Avg merge
2d 1h
Merged PRs (30d)
21

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from haskell/haskell-language-server

All issues in haskell/haskell-language-server

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.