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 monadic versions of many functions #125

Closed
chshersh opened this issue May 13, 2019 · 2 comments
Closed

Add monadic versions of many functions #125

chshersh opened this issue May 13, 2019 · 2 comments
Assignees
Labels
good first issue Good for newcomers log-action Everything related to LogAction data type package:co-log-core For: co-log-core

Comments

@chshersh
Copy link
Contributor

chshersh commented May 13, 2019

We have cmap and cmapM but somehow all other versions are missing. So let's add them as well:

cfilterM :: Monad m => (a -> m Bool) -> LogAction m a -> LogAction m a
cmapMaybeM :: Monad m => (a -> m (Maybe b)) -> LogAction m b -> LogAction m a
divideM :: Monad m => (a -> m (b, c)) -> LogAction m b -> LogAction m c -> LogAction m a
chooseM :: MonadM => (a -> m (Either b c)) -> LogAction m b -> LogAction m c -> LogActoin m a

In addition we can add several helper LogAction transformations:

pureLogAction   :: LogAction m (m msg) -> LogAction m msg
impureLogAction :: LogAction m msg -> LogAction m (m msg)
@chshersh chshersh added package:co-log-core For: co-log-core log-action Everything related to LogAction data type labels May 13, 2019
@chshersh chshersh added the good first issue Good for newcomers label Jun 29, 2019
@piq9117
Copy link
Contributor

piq9117 commented Sep 23, 2019

If no one is working on this, can you assign it to me?

@chshersh
Copy link
Contributor Author

@piq9117 To my knowledge, nobody is working on this. So, sure, go ahead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers log-action Everything related to LogAction data type package:co-log-core For: co-log-core
Projects
None yet
Development

No branches or pull requests

2 participants