Proposal: add HasCallStack for all partial functions in base

Henning Thielemann lemming at henning-thielemann.de
Sun Jun 16 18:26:52 UTC 2019


On Sun, 16 Jun 2019, Simon Jakobi wrote:

> >  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 think you have to declare:

instance Foldable [] where
    foldl1 = foldl1List

foldl1List :: HasCallStack => (a->a->a) -> [a] -> a
foldl1List = ...

Would this work?


More information about the Libraries mailing list