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

Derive more #2

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Derive more #2

wants to merge 12 commits into from

Conversation

serras
Copy link

@serras serras commented Jun 22, 2020

This PR adds more auto-derivable classes to TraceT. These have proved to be useful when using tracing as part of the Mu microservice library.

@serras
Copy link
Author

serras commented Jun 22, 2020

I have pushed a second commit moving from unliftio to monad-control. This makes the library more powerful at almost zero cost, since more types implement MonadBaseControl IO than UnliftIO. In particular, we had a case in which we required the former because of an ExceptT layer in the stack.

@serras
Copy link
Author

serras commented Jul 14, 2020

Since we really needed these changes, we have published a fork in Hackage. Sorry for any inconvenience, but otherwise we could not move forward with our project :(

@mtth
Copy link
Owner

mtth commented Nov 12, 2020

Thanks for the PR @serras and apologies for the slow reply, I am just catching up on this repo. I don't think I had notifications turned on here. It looks like your PR now includes the fork changes, let me know if you are still interested in merging parts of it.

@serras
Copy link
Author

serras commented Nov 12, 2020

I would be happy to prepare a new PR. A question remains, though: this library uses unliftio, whereas I needed support for monad-control. Does it make sense to have everything in one single place, or would people dislike having both dependencies from a single library?

@mtth
Copy link
Owner

mtth commented Nov 15, 2020

It would be great if users could pick only the one they are interested in. I'm not an expert in Haskell tooling though, do you know any good options to support this?

@serras
Copy link
Author

serras commented Nov 15, 2020

In theory there is now support for multiple public libraries in a single package, so people could depend on tracing:control. However, you need a recent version of Cabal, and there is no support for it in Stack, so I don't think that's a good option.

@coderfromhere
Copy link

Isn't monad-control more generic implementation of the same pattern? it seems there's also a way to express the current unliftio signatures through monad-control if needed - https://lexi-lambda.github.io/blog/2019/09/07/demystifying-monadbasecontrol/#relationship-to-monadunliftio

@serras
Copy link
Author

serras commented Mar 30, 2021

Yes, that's true. But often you want to use only one of those, because they come with their own "ecosystem" of surrounding libraries. I think many people would dislike a library if it depended on both monad-control and unliftio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants