Skip to content

Conversation

@JakubBarta
Copy link

First of all, I'd like to thank you for your great work on this library!

This PR exports the TraceT data constructor, thus allowing for more instances for TraceT to be defined.

The project I'm working on unfortunately doesn't work well with UnliftIO, so I have to define instances for MonadBaseControl IO.

@JakubBarta
Copy link
Author

Hi @mtth
Did you have an opportunity to have a look at this PR? :)

@mtth
Copy link
Owner

mtth commented Aug 14, 2021

Hi @JakubBarta, apologies for the delay. I'm concerned that this change will restrict our ability to evolve the library. For example #13 might have broken clients if they relied on the type's representation. I understand the usefulness of being able to define new instances but I'm not sure what a good solution to allow it is yet.

Could you share the instance MonadBaseControl instance implementation you'd use?

@JakubBarta
Copy link
Author

Hi @mtth, thanks for the quick reply!
I actually had to define instances for multiple typeclasses. Most of them are derived:

deriving newtype instance MonadBaseControl IO m => MonadBaseControl IO (TraceT m)
deriving newtype instance MonadBase IO m => MonadBase IO (TraceT m)
deriving newtype instance MonadMask m => MonadMask (TraceT m)
deriving newtype instance MonadThrow m => MonadThrow (TraceT m)
deriving newtype instance MonadFail m => MonadFail (TraceT m)
deriving newtype instance (MonadCatch m, MonadThrow m) => MonadCatch (TraceT m)

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.

2 participants