<div dir="auto"><div dir="auto">I like this avenue of thought! I would suggest the following:</div><div dir="auto"><br></div><div>Step 1: Accept this proposal.</div><div dir="auto"><br></div><div dir="auto">Step 2: Introduce more <b>educational</b> error messages in the exceptions. Instead of "error: empty list", for example, it could be "error: unguarded use of head has failed".</div><div dir="auto"><br></div><div dir="auto">Sorry for phone-brevity.<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Mon, 31 May 2021, 19.31 Hécate, <<a href="mailto:hecate@glitchbra.in">hecate@glitchbra.in</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div>
    <p>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.<br>
      <br>
    </p>
    <div>Le 31/05/2021 à 18:15, Henning
      Thielemann a écrit :<br>
    </div>
    <blockquote type="cite">
      <br>
      On Mon, 31 May 2021, Ryan Trinkle via Libraries wrote:
      <br>
      <br>
      <blockquote type="cite">I certainly agree that a more systemic
        solution would be preferable.
        <br>
        However, none have been forthcoming in the 15 or so years I've
        been
        <br>
        using Haskell.  The use of partial functions in library code has
        been
        <br>
        one of the few consistent sources of multi-day debugging
        exercises in
        <br>
        Haskell that I've seen, and even cutting that down in an ad-hoc
        way
        <br>
        would be valuable, since there are probably a dozen functions
        that
        <br>
        account for 80% of the debugging hours (I'd certainly like to
        see
        <br>
        fromJust on that list, for example).
        <br>
      </blockquote>
      <br>
      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!
      <br>
      <br>
      If so, then we should make sure that every such tagged function
      has a total counterpart.<br>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Libraries mailing list
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank" rel="noreferrer">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a>
</pre>
    </blockquote>
    <pre cols="72">-- 
Hécate ✨
🐦: @TechnoEmpress
IRC: Hecate
WWW: <a href="https://glitchbra.in" target="_blank" rel="noreferrer">https://glitchbra.in</a>
RUN: BSD</pre>
  </div>

_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div></div></div>