Open serras opened 4 years ago
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.
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 :(
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.
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?
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?
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.
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
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
.
This PR adds more auto-derivable classes to
TraceT
. These have proved to be useful when usingtracing
as part of the Mu microservice library.