The general pattern is to have a monad signature given in Control.Monad.Sig.Class and then a concrete structure, which is the "canonical" implementation of that signature, in Control.Monad.Trans.SigT.
But TraceT is not the canonical instance of MonadTrace, it is a particular instance which combines tracing with error handling in a useful way. The canonical instance would be a minimal wrapper around StateT, probably.
To avoid confusing people, the TraceT type might be better named something else.
The general pattern is to have a monad signature given in
Control.Monad.Sig.Classand then a concrete structure, which is the "canonical" implementation of that signature, inControl.Monad.Trans.SigT.But
TraceTis not the canonical instance ofMonadTrace, it is a particular instance which combines tracing with error handling in a useful way. The canonical instance would be a minimal wrapper aroundStateT, probably.To avoid confusing people, the
TraceTtype might be better named something else.