RFC: Add HasCallStack constraint to partial Data.List functions.
Hécate
hecate at glitchbra.in
Mon May 31 16:31:04 UTC 2021
I think the vast majority of the functions presented in this proposal
have a total counterpart, whether it is a function or a code pattern. We
have NonEmpty in `base`, as well as ExceptT/MonadError and Exceptions to
allow us to mimic such a cul-de-sac in the code with appropriate
annotations around it.
Le 31/05/2021 à 18:15, Henning Thielemann a écrit :
>
> 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.
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
--
Hécate ✨
🐦: @TechnoEmpress
IRC: Hecate
WWW: https://glitchbra.in
RUN: BSD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20210531/ee4ae11d/attachment.html>
More information about the Libraries
mailing list