Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Apply Hlint doesn't work reliably #533

@AlexeyRaga

Description

@AlexeyRaga

It looks like Apply Hlint is broken now. According to the log the diff part is always empty.
Here is the relevant part of the log from HIE:

2018-04-22 00:01:27.351504 [ThreadId 7] - applyHint:ideas=[/private/var/folders/3x/l50y6rts50j_9jqyp0fl7lqh0000gn/T/ghc-mod65311/Main65310-0.hs:90:54: Warning: Redundant bracket
Found:
  "  " <> (show inputTopic)
Why not:
  "  " <> show inputTopic
]

2018-04-22 00:01:27.385353 [ThreadId 7] - applyHint:commands=[("/private/var/folders/3x/l50y6rts50j_9jqyp0fl7lqh0000gn/T/ghc-mod65311/Main65310-0.hs:90:54: Warning: Redundant bracket\nFound:\n  \"  \" <> (show inputTopic)\nWhy not:\n  \"  \" <> show inputTopic\n",[Replace {rtype = Expr, pos = SrcSpan {startLine = 90, startCol = 62, endLine = 90, endCol = 79}, subts = [("x",SrcSpan {startLine = 90, startCol = 63, endLine = 90, endCol = 78})], orig = "x"}])]

2018-04-22 00:01:27.395631 [ThreadId 7] - applyHint:diff=WorkspaceEdit {_changes = Just (fromList [(Uri {getUri = "file:///Users/araga/src/arbor/topictap/app/Main.hs"},List [])]), _documentChanges = Nothing}

2018-04-22 00:01:27.464431 [ThreadId 7] - applyOneCmd:file="/Users/araga/src/arbor/topictap/app/Main.hs"

2018-04-22 00:01:27.464508 [ThreadId 7] - applyOneCmd:res=Right (WorkspaceEdit {_changes = Just (fromList [(Uri {getUri = "file:///Users/araga/src/arbor/topictap/app/Main.hs"},List [])]), _documentChanges = Nothing}

Examples:

This doesn't work (log above)

forM_ inputTopics $ \inputTopic -> logInfo $ "  " <> (show inputTopic)

But this works fine

forM_ inputTopics $ \inputTopic -> logInfo $ "  " <> show (inputTopic)

I made some tests and it looks like in a number of examples suggestions that impact code after <> are not getting applied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions