-
-
Notifications
You must be signed in to change notification settings - Fork 400
Closed
Labels
type: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Description
In hls, the exactprint doesn't preserve lines starting with #!
. I've written a failing test case for this in #2725.
Your environment
Which OS do you use:
Ubuntu 20.04
Which LSP client (editor/plugin) do you use:
VSCode
Describe your project (alternative: link to the project):
hls itself
Compiler Version:
Currently checked on ghc 8.10.7
Steps to reproduce
Given this code:
import
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])"
Data.Monoid ( Monoid )
class Semigroup a => SomeData a
instance SomeData All
We can place the cursor on All and select code action "Add All to the import list of Data.Monoid", and see how the file content changes.
Expected behaviour
This is the correct code after extending the import, without losing the shebang line.
import
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])"
Data.Monoid ( Monoid, All )
class Semigroup a => SomeData a
instance SomeData All
Actual behaviour
This is what we are getting now.
import
Data.Monoid ( Monoid, All )
class Semigroup a => SomeData a
instance SomeData All
pepeiborra, Ailrun and MithicSpirit
Metadata
Metadata
Assignees
Labels
type: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..