Skip to content

Eval plugin: output difff when there's trailing newline #4410

Open
@jakio6

Description

@jakio6

Your environment

Which OS do you use?
Linux

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

How is your project built (alternative: link to the project)?
single file

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

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

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

Steps to reproduce

Evaluate twice

-- |
-- >>> import Prettyprinter
--
-- >>> pretty "foo"
--
-- >>> pretty "foo\n"
--
-- >>> pretty "foo\n\n"
--

Expected behaviour

No diff for the last two test.

Actual behaviour

First evaluate:

-- |
-- >>> import Prettyprinter
--
-- >>> pretty "foo"
-- foo
--
-- >>> pretty "foo\n"
-- foo
--
-- >>> pretty "foo\n\n"
-- foo
-- <BLANKLINE>
--

Second evaluate:

-- |
-- >>> import Prettyprinter
--
-- >>> pretty "foo"
-- foo
--
-- >>> pretty "foo\n"
-- WAS foo
-- NOW foo
--
-- >>> pretty "foo\n\n"
-- WAS foo
-- WAS <BLANKLINE>
-- NOW foo
-- <BLANKLINE>
--

Debug information

Metadata

Metadata

Assignees

No one assigned

    Labels

    HackathonThis issue is suitable for hackathon sessionscomponent: hls-eval-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