tracing icon indicating copy to clipboard operation
tracing copied to clipboard

Derive more

Open serras opened this issue 5 years ago • 8 comments

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 avatar Jun 22 '20 13:06 serras

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 avatar Jun 22 '20 14:06 serras

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 :(

serras avatar Jul 14 '20 09:07 serras

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.

mtth avatar Nov 12 '20 06:11 mtth

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?

serras avatar Nov 12 '20 08:11 serras

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?

mtth avatar Nov 15 '20 02:11 mtth

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.

serras avatar Nov 15 '20 17:11 serras

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

coderfromhere avatar Mar 30 '21 11:03 coderfromhere

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.

serras avatar Mar 30 '21 14:03 serras