-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid hint for record field id
#1383
Comments
Thanks - as it stands HLint doesn't know about the OverloadedRecordDot extension, so thinks you have written a function composition. Given #1376 is incoming, let's wait and then once that lands, write a test for this so it doesn't happen again. |
I don't know if this is useful, but another example that I've encountered is the following: data Foo = Foo
{ id :: Int
}
main = print $ (Foo 42).id Results in:
|
@ndmitchell thank you very much for this library. I was having the issue as well, but it turned out it was because TLDR, should this issue be closed?
|
I still get this issue on HLint v3.8, is there remaining work that needs to be done here? Or might there have been a regression? |
When using
OverloadedRecordDot
extension after defining record with field nameid
, hlint will give incorrect hints when fieldid
of record is used via dot syntax.Example
Actual
hlint src/Lib.hs
:Expected
No hints found on
print x.id
lineSetup
GHC
:9.2.1
hlint:
v3.4
/052eff7
(master
branch as of today)Potential solution
Enabling
ghc-lib
solves the issue, #1376 will solve itThe text was updated successfully, but these errors were encountered: