Eval plugin errors on `:seti`
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
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
- Clone https://github.com/haskell/text
- open https://github.com/haskell/text/blob/5f948615af326db15ae1757246c4e9d532daf093/src/Data/Text/Lazy.hs#L2000
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from haskell/haskell-language-server
-
status: needs triage type: enhancement
Difficulty 1/5 Under an hour Newbie friendliness 90/100
haskell/haskell-language-server#5128 ·
Maintainers usually reply within 1 day
-
Broken formatting when extending empty hiding listPossibly taken @marcellussiegburg claimed this 5 days ago. Opencomponent: hls-refactor-plugin Hackathon status: needs triage type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
haskell/haskell-language-server#5111 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
notes: "Internal Error: Line not found in file" when hovering the empty line after a file's final newlineMay be free again A pull request for this issue was closed without being merged. Opencomponent: hls-notes-plugin level: easy type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
haskell/haskell-language-server#5063 · 4 comments ·
Maintainers usually reply within 1 day
-
bindists type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
haskell/haskell-language-server#5060 · 3 comments ·
Maintainers usually reply within 1 day
-
component: hls-gadt-plugin type: bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
haskell/haskell-language-server#5142 · 3 comments ·
Maintainers usually reply within 1 day
All issues in haskell/haskell-language-server
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
simplex-chat/simplex-chat#7714 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
[BUG]: -std selection does not work with COBOL -> GnuCOBOL 1.1Possibly taken @Anandb71 claimed this 1 day ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
compiler-explorer/compiler-explorer#9272 ·
Maintainers usually reply within 1 day