>  I think only the partial implementations should get that constraint.

Oops, I had the misconception that one couldn't add a HasCallStack constraint to method implementations.

I agree though!


Am So., 16. Juni 2019 um 18:26 Uhr schrieb Henning Thielemann <lemming@henning-thielemann.de>:

On Sun, 16 Jun 2019, Simon Jakobi via Libraries wrote:

> I like the idea of marking partial functions with HasCallStack.
> But I'd like to point out that we also have class methods where some but not all implementations are partial,
> such as foldr1 in Foldable.
>
> Should methods like these also get a HasCallStack constraint?

I think only the partial implementations should get that constraint.