Skip to content

Eval plugin errors on :seti #5144

Open
Open

Description

@Aster89

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

Activity

  1. added theissue type on Oct 13, 2026
  2. dschrempf commented on Oct 13, 2026

    @dschrempf
    Collaborator

    Is this new? Did my recent PR affect this? #4963

  3. Aster89 commented on Oct 13, 2026

    @Aster89
    CollaboratorAuthor

    No, you just merged 2 days ago, right? My first experience with the described issue is from 2 weeks ago or so, as testified by haskell/text#711 (review).

  4. dyniec commented on Oct 15, 2026

    @dyniec
    Collaborator

    It might be the same core issue as in #1817, that is eval plugin sometimes doesn't support ghci commands

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

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions