-
Notifications
You must be signed in to change notification settings - Fork 26
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
Remove unused functions (or convince those functions are useful) #32
Comments
Personally I want to keep
safeSum :: Int -> Int -> Maybe Int
safeSum a b = do
verifiedA <- guarded (>0) a
verifiedB <- guarded (>0) b
pure $ verifiedA + verifiedB |
Regarding functions we don't use I don't mind if you remove all of them except |
Dunno about |
That's the point. We don't want to keep things that are not intended to be used. Not every project uses
I like general version more :) So I insist on instead of removing we should introduce more general versions and remove
Well, we have |
As for me,
I am not sure if everybody is fine with having |
Okay, that seems convincing. Maybe it's better to rename
Also agree. We have only one usage of Now I'm convinced that having |
+1
Agreed. |
We have some functions in
universum
but we don't use them. Probably those functions are redundant. We can keep functions if we found some real uses cases or good usages (though it worth it to keep such functions inuniversum
). So there're maybe 3 verdicts:BARDAQserokell-util
Here is full list of functions we don't use and personally I dont find useful:
orAlt
orEmpty
liftAA2
eitherA
<<*>>
guardM
traceIO
tryIO
<<$>>
liftM'
liftM2'
unsafeThrow
leftToMaybe
maybeToLeft
applyN
guarded
guardedA
Here some functions we either use a little (but probably can be removed):
purer
(1)NotImplemented
(7, but actually don't use it)concatMapM
(1)FatalError
(2, #29)rightToMaybe
(2)maybeToRight
(1)Some redundant things:
Bifunctor
for tuples length >= 3The text was updated successfully, but these errors were encountered: