<div dir="auto">Indeed. Enum as it’s currently defined is totally broken and actively a bad interface :)</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 18, 2020 at 11:04 AM David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">We should add an Ord constraint to Enum and Bounded. The more constraints we add to Enum, the fewer instances we will have and the sooner my ultimate goal of removing it altogether will be achieved. Mwahahahaha!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 18, 2020, 10:41 AM Oleg Grenrus <<a href="mailto:oleg.grenrus@iki.fi" target="_blank">oleg.grenrus@iki.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br>  <br><br>    <br><br>  <br><br>  <div><br><br>    <p>Is it (a bug)?<br><br><br>      <br><br><br>      What about [minBound .. maxBound]. If you change `Bounded`, you<br><br>      need to change `Enum` too.<br><br><br>      <br><br><br>      From<br><br><a href="https://hackage.haskell.org/package/base-4.14.0.0/docs/GHC-Enum.html#t:Enum" rel="noreferrer" target="_blank">https://hackage.haskell.org/package/base-4.14.0.0/docs/GHC-Enum.html#t:Enum</a><br><br><br>      <br><br><br>      - The calls succ maxBound and pred minBound should result in a<br><br>      runtime error.<br><br><br>      - enumFrom and enumFromThen should be defined with an implicit<br><br>      bound</p><br><br>    <p>The `min` and `max` in `minBound/maxBound` are related to `succ`,<br><br>      `pred`, not to `compare`. If you argue against, then we should add<br><br>      `Ord` super-class to `Enum` (and `Bounded`).<br><br><br>    </p><br><br>    <p>- Oleg<br><br><br>    </p><br><br>    <div>On 18.9.2020 16.54, Carter Schonwald<br><br>      wrote:<br><br><br>    </div><br><br>    <blockquote type="cite"><br><br>      <br><br>      <div dir="auto">Def a bug! Plz at myself and the core libraries<br><br>        handle for code review plz. </div><br><br>      <div dir="auto"><br><br><br>      </div><br><br>      <div dir="auto">This sounds kinda related to an MR that has<br><br>        languished too long regarding the behavior of Down on Ord1,<br><br>        which I think is related??? (I tried to arbitrate / layout<br><br>        possible answers for the related issue in the associated mr, but<br><br>        none of the clc members have engaged in the design space<br><br>        challenge)</div><br><br>      <div><br><br><br>        <div class="gmail_quote"><br><br>          <div dir="ltr" class="gmail_attr">On Fri, Sep 18, 2020 at 7:44<br><br>            AM David Beacham <<a href="mailto:mail@dbeacham.co.uk" rel="noreferrer" target="_blank">mail@dbeacham.co.uk</a>> wrote:<br><br><br>          </div><br><br>          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br>            <div dir="ltr"><br><br>              <div>Hi all,</div><br><br>              <div><br><br><br>              </div><br><br>              <div>The current instance for `Bounded a => Bounded<br><br>                (Down a)` derives the `minBound` and `maxBound` exactly<br><br>                as they are for the underlying type `a` where I think<br><br>                they should be flipped to respect the flipped ordering<br><br>                of `Down a`?</div><br><br>              <div><br><br><br>              </div><br><br>              <div>I have a feeling this has been come up in some other<br><br>                context/list before but I couldn't find a reference to<br><br>                it when searching - so sorry if this is a duplicate.</div><br><br>              <div><br><br><br>              </div><br><br>              <div>I've got a corresponding MR here: <a href="https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4081" rel="noreferrer" target="_blank">https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4081</a></div><br><br>              <div><br><br><br>              </div><br><br>              <div>Thanks, David.<br><br><br>              </div><br><br>            </div><br><br>            <br><br><br>            <br><br><br>            _______________________________________________<br><br><br>            <br><br><br>            Libraries mailing list<br><br><br>            <br><br><br>            <a href="mailto:Libraries@haskell.org" rel="noreferrer" target="_blank">Libraries@haskell.org</a><br><br><br>            <br><br><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><br><br>            <br><br><br>          </blockquote><br><br>        </div><br><br>      </div><br><br>      <br><br><br>      <fieldset></fieldset><br><br>      <pre>_______________________________________________<br><br>Libraries mailing list<br><br><a href="mailto:Libraries@haskell.org" rel="noreferrer" target="_blank">Libraries@haskell.org</a><br><br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br><br></pre><br><br>    </blockquote><br><br>  </div><br><br><br><br>_______________________________________________<br><br><br>Libraries mailing list<br><br><br><a href="mailto:Libraries@haskell.org" rel="noreferrer" target="_blank">Libraries@haskell.org</a><br><br><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><br><br></blockquote></div><br><br>_______________________________________________<br><br>Libraries mailing list<br><br><a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br><br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br><br></blockquote></div></div>