Skip to content
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

Add hlint rules for whenLeft and whenLeftM #80

Closed
vrom911 opened this issue Sep 9, 2018 · 2 comments
Closed

Add hlint rules for whenLeft and whenLeftM #80

vrom911 opened this issue Sep 9, 2018 · 2 comments
Labels
Hacktoberfest https://hacktoberfest.digitalocean.com/ help wanted Extra attention is needed hlint

Comments

@vrom911
Copy link
Member

vrom911 commented Sep 9, 2018

Also whenRight and whenRightM can be done here.

@vrom911 vrom911 added help wanted Extra attention is needed hlint labels Sep 9, 2018
@vrom911 vrom911 added the Hacktoberfest https://hacktoberfest.digitalocean.com/ label Sep 30, 2018
@vrom911 vrom911 added this to To do in #2: Hacktoberfest (October, 2018) via automation Sep 30, 2018
@tillydray
Copy link

Recommend closing this issue, it has already been done, here's one example:

relude/.hlint.yaml

Lines 374 to 376 in 170b70d

- warn:
lhs: (case m of Left x -> f x; Right _ -> pure () )
rhs: whenLeft_ m f

@vrom911
Copy link
Member Author

vrom911 commented Oct 5, 2018

The rules that you quoted are for whenLeft_ and whenLeftM_ functions. This issue is for whenLeft and whenLeftM, so it still needs to be done, but the rules are going to be very similar to these ones 🙂

tillydray pushed a commit to tillydray/relude that referenced this issue Oct 5, 2018
And their monadic versions. Simply copied and pasted pre-existing rules
for whenLeft_, whenRight_, and _their_ monadic versions.
tillydray pushed a commit to tillydray/relude that referenced this issue Oct 12, 2018
tillydray pushed a commit to tillydray/relude that referenced this issue Oct 12, 2018
Supersedes 783f63f, which added the rules directly to .hlint.yaml, like
a barbarian might do ;)
#2: Hacktoberfest (October, 2018) automation moved this from To do to Done: Issues Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest https://hacktoberfest.digitalocean.com/ help wanted Extra attention is needed hlint
Projects
No open projects
Development

No branches or pull requests

2 participants