-
Notifications
You must be signed in to change notification settings - Fork 11
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
Added a hlint file #17
Conversation
Added a hlint file to point out places where flow can be used. It is currently biased towards left-to-right writing direction
Added a hlint file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
I've never used a custom HLint file from another package/project before. How would a user consume this file?
hlint-flow.yaml
Outdated
- hint: | ||
lhs: 'f <| x' | ||
note: 'Use `|>` for natural reading direction' | ||
rhs: 'x |> f' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I typically use <|
for passing a big do
block to a function. Does this hint fire for code like this?
liftIO <| do
now <- getCurrentTime
print now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been bothering me also as I don't know how to do it. Perhaps this hint should be disabled?
You can run this by first installing hlint (stack install works well) and then doing I was impressed about the relude hlint file which was actually super helpful in learning relude and I think flow could be a similar case. |
Something in the README would be nice. That's what Relude does. We could probably avoid all the directional hints. Maybe keep them in the file but comment them out? |
Added instructions and removed the hints that make bad suggestions on `f <| do ...`.
I removed the directional hints for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Added a hlint file for finding places where flow can be used.
It is currently biased to use left-to-right operators