Mikolaj / horde-ad

Higher Order Reverse Derivatives Efficiently - Automatic Differentiation library based on the paper "Provably correct, asymptotically efficient, higher-order reverse-mode automatic differentiation"
BSD 3-Clause "New" or "Revised" License
34 stars 6 forks source link

Make assertEqualUpToEpsilon show the correct line number #88

Open Mikolaj opened 1 year ago

Mikolaj commented 1 year ago

Right now, most of the time, it shows the line it's defined at instead of the one it's called at, where the mistake is made.

HasCallStack is already added wherever possible, so we need to catch and re-throw exceptions or find a way to add HasCallStack to the typeclass (apparently forbidden).