-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
For example, applying "Redundant $" clears the first line of the file, so #!/usr/bin/env cabal
is removed.
Before:
#!/usr/bin/env cabal
{- cabal:
build-depends: base
-}
main :: IO ()
main = print $ "test"
After:
{- cabal:
build-depends: base
-}
main :: IO ()
main = print "test"
This can be reproduced on refactor --version
v0.13.0.0 with ghc 9.4.4 by running
hlint Test.hs --serialise > hlint-refactor
refactor Test.hs --refact-file hlint-refactor
with hlint-refactor
containing
[("Test.hs:8:14: Suggestion: Redundant $\nFound:\n print $ \"test\"\nPerhaps:\n print \"test\"\n",[Replace {rtype = Expr, pos = SrcSpan {startLine = 8, startCol = 8, endLine = 8, endCol = 22}, subts = [("a",SrcSpan {startLine = 8, startCol = 8, endLine = 8, endCol = 13}),("b",SrcSpan {startLine = 8, startCol = 16, endLine = 8, endCol = 22})], orig = "a b"}])]
Looks related to this issue
Metadata
Metadata
Assignees
Labels
No labels