alephcloud / hs-yet-another-logger

Haskell logging framework with a focus on flexibility and performance
Other
5 stars 4 forks source link

Delete orphan MonadTrace instance #27

Closed jonsterling closed 9 years ago

jonsterling commented 9 years ago

I have released a new version of the trace package which includes standard MonadTrace implementations for the various transformers.

The implementation in trace, however, is the straightforward/standard one:

traceScope t (ReaderT m) = ReaderT $ traceScope t . m

Are you relying on the behavior of the one in this package? If so, can you help me understand what is going is going on in this one, and whether it makes sense to make this the standard implementation?

larskuhtz commented 9 years ago

@jonsterling, your implementation looks good.

The implementation in this package was a generic application of the MonadBaseControl instance. Yours should be equivalent. Probably, with recent versions of monad-control, both instance would reduce to the same code. In the trace package your concrete implementation should be preferred, since it's much easier to understand -- I was just lazy when I implemented it here.

larskuhtz commented 9 years ago

Thanks, @jonsterling, for submitting this PR.

jonsterling commented 9 years ago

Ah, OK! I'm glad there wasn't some tricky edge case that was being worked around or something.