RFC: Add HasCallStack constraint to partial Data.List functions.
Henning Thielemann
lemming at henning-thielemann.de
Mon May 31 16:15:08 UTC 2021
On Mon, 31 May 2021, Ryan Trinkle via Libraries wrote:
> I certainly agree that a more systemic solution would be preferable.
> However, none have been forthcoming in the 15 or so years I've been
> using Haskell. The use of partial functions in library code has been
> one of the few consistent sources of multi-day debugging exercises in
> Haskell that I've seen, and even cutting that down in an ad-hoc way
> would be valuable, since there are probably a dozen functions that
> account for 80% of the debugging hours (I'd certainly like to see
> fromJust on that list, for example).
I understand the proposal as tagging all partial functions in a compiler
accessible way, in order to tell the user: Don't use that function!
If so, then we should make sure that every such tagged function has a
total counterpart.
More information about the Libraries
mailing list