ccadllc / cedi-dtrace

Provides a functional API for tracing programs across system and network boundaries.
Apache License 2.0
62 stars 12 forks source link

Integrating with tagless final #84

Open eli-jordan opened 5 years ago

eli-jordan commented 5 years ago

What is the recommended way to use TraceT with a service built using tagless final?

I think it can work, if the interpreters of your algebras are all based on TraceT. However, I'd like to use typeclass constraints for the interpreters too.

Any tips?

sbuzzard commented 4 years ago

Apologies for not seeing this sooner. You can have typeclass constraints on the interpreters as well and then apply the TraceT[IO, ?] (replace IO with whatever concrete effect type you're using, if it's something like Monix or ZIO), just as you'd apply the naked IO (or whatever) for a non-trace enabled interpreter. It would help to see an example. I realize this is a way late reply and all this may have been resolved or you've moved on some time ago. Apologies again.