{"action":"created","issue":{"url":"https://api.github.com/repos/ndmitchell/hlint/issues/136","repository_url":"https://api.github.com/repos/ndmitchell/hlint","labels_url":"https://api.github.com/repos/ndmitchell/hlint/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/ndmitchell/hlint/issues/136/comments","events_url":"https://api.github.com/repos/ndmitchell/hlint/issues/136/events","html_url":"https://github.com/ndmitchell/hlint/issues/136","id":88038051,"number":136,"title":"Do not try and eta reduce runST","user":{"login":"ndmitchell","id":1651197,"avatar_url":"https://avatars.githubusercontent.com/u/1651197?v=3","gravatar_id":"","url":"https://api.github.com/users/ndmitchell","html_url":"https://github.com/ndmitchell","followers_url":"https://api.github.com/users/ndmitchell/followers","following_url":"https://api.github.com/users/ndmitchell/following{/other_user}","gists_url":"https://api.github.com/users/ndmitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/ndmitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndmitchell/subscriptions","organizations_url":"https://api.github.com/users/ndmitchell/orgs","repos_url":"https://api.github.com/users/ndmitchell/repos","events_url":"https://api.github.com/users/ndmitchell/events{/privacy}","received_events_url":"https://api.github.com/users/ndmitchell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-13T17:29:49Z","updated_at":"2016-02-04T09:00:07Z","closed_at":null,"body":"From http://code.google.com/p/ndmitchell/issues/detail?id=618:\r\n\r\nhlint-1.8.49 when applied to this code:\r\n\r\n    import Control.Monad.ST\r\n\r\n    action :: Int -> ST s Int\r\n    action x = return (x + 1)\r\n\r\n    tmp :: [Int] -> [Int]\r\n    tmp = map (\\ x -> runST $ action x)\r\n\r\ngives:\r\n\r\n    Warning: Avoid lambda\r\n    Found:\r\n      \\ x -> runST $ action x\r\n    Why not:\r\n      runST . action\r\n\r\nrunST has a polymorphic type of rank 2, so such modification is incorrect due to problem with (.) typization and will cause compilation error.\r\n\r\nI replied: runST is _the_ rank2 function, so maybe I should just not do anything when I see a runST and be super careful."},"comment":{"url":"https://api.github.com/repos/ndmitchell/hlint/issues/comments/179716725","html_url":"https://github.com/ndmitchell/hlint/issues/136#issuecomment-179716725","issue_url":"https://api.github.com/repos/ndmitchell/hlint/issues/136","id":179716725,"user":{"login":"ndmitchell","id":1651197,"avatar_url":"https://avatars.githubusercontent.com/u/1651197?v=3","gravatar_id":"","url":"https://api.github.com/users/ndmitchell","html_url":"https://github.com/ndmitchell","followers_url":"https://api.github.com/users/ndmitchell/followers","following_url":"https://api.github.com/users/ndmitchell/following{/other_user}","gists_url":"https://api.github.com/users/ndmitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/ndmitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndmitchell/subscriptions","organizations_url":"https://api.github.com/users/ndmitchell/orgs","repos_url":"https://api.github.com/users/ndmitchell/repos","events_url":"https://api.github.com/users/ndmitchell/events{/privacy}","received_events_url":"https://api.github.com/users/ndmitchell/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T09:00:07Z","updated_at":"2016-02-04T09:00:07Z","body":"For top level things, if the variable is named `mr` then I don't eta reduce it. I wonder if I should add the same rule for lambdas? Would `\\mr -> ...` be excessively hideous? Marking some functions as sensitive isn't out of the question either."}}