monadic-xyz / gossip

Epidemic Broadcast Trees implementation using HyParView
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

Thread the CallStack of the tracer #21

Closed kim closed 5 years ago

kim commented 5 years ago

This allows to get at the SrcLoc of the actual callsite, not the interpreter's.

kim commented 5 years ago

this pattern is factorable out into an abstraction

I guess we could wrap it in a newtype to hide the RankNTypes. Perhaps worth trying in the oscoin codebase, as passing a partially applied Telemetry.emit unifying the argument increases modularity in a few places.

adinapoli-mndc commented 5 years ago

Right, the above (newtype with a tucked forall in these) was basically what I had in mind 😉

I can see how we might want this desirable property of precise callstack traces in a lot of places, so perhaps having something like a Traced newtype we somehow apply to have this precision might be worth a try.

Perhaps worth trying in the oscoin codebase, as passing a partially applied Telemetry.emit unifying the argument increases modularity in a few places.

Indeed. There are a bunch of places in oscoin where I do recall we weren't getting exactly precise callstacks, and would be interesting to see how that changes.