-
Notifications
You must be signed in to change notification settings - Fork 202
Open
Description
Unsure whether this is an hlint or apply-refact bug, so I am reporting it here, extracted from #1642.
It looks related to
Using apply-refact from git, and hlint from git, on GHC 9.12.2 with a Hackage index from today.
Main.hs
:
main = id $
-- Hello world
pure ()
% hlint --serialise Main.hs | tee refactors
[( "Main.hs:(1,8)-(3,9): Warning: Redundant id\nFound:\n id $ pure ()\nPerhaps:\n pure ()\n"
, [Replace
{ rtype = Expr
, pos = SrcSpan
{ startLine = 1
, startCol = 8
, endLine = 3
, endCol = 10 }
, subts = [("x",SrcSpan {startLine = 3, startCol = 3, endLine = 3, endCol = 10})]
, orig = "x"}])]
% refactor --refact-file refactors Main.hs
Applying 1 hints
main =
-- Hello world pure ()
This is an invalid program now, since there is no expression on the rhs.
Metadata
Metadata
Assignees
Labels
No labels