<html><head></head><body><div><div><div><div>No worries Sylvain,<br/></div><div><br/></div><div>Mistakes will be made while improving things, and we caught it, so that's great. Thanks for the head's up and good luck with your ongoing improvements! <br/></div><div><br/></div><div>Cheers,<br/></div><div>Emily</div></div><div><div style="display: none; border: 0px; width: 0px; height: 0px; overflow: hidden; visibility: hidden;"><img src="https://r.superhuman.com/d5rkjM1e9BJ9J-TR0NL-lno28FQ01l19A4J8Vp9N11irTIKFc1D-iZYRuJBfrbZxf_EgfvEZXOm6RRMk761RpU1I6mdAJo-RAc6lYHkxBf5FDi7mHvPkXKJD47DMgZtGbkzvxXTgUV6CoGkqS6ayoMO8wEHEnJyrRP1OZBCHTPElHMFeSRVf8Y4NCGY.gif" alt=" " width="1" height="0" style="display: none; border: 0px; width: 0px; height: 0px; overflow: hidden; visibility: hidden;"/><!-- --></div><br/><div class="gmail_signature"></div></div><br/><div><div class="gmail_quote">On Thu, Mar 04, 2021 at 4:24 PM, Sylvain Henry <span dir="ltr"><<a href="mailto:sylvain@haskus.fr" target="_blank">sylvain@haskus.fr</a>></span> wrote:<br/><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote sh-color-black sh-color" style="null" id="null"><p class="sh-color-black sh-color">Hi Café,</p>
<p class="sh-color-black sh-color">I've made a mistake while implementing constant folding for
Natural numbers in GHC 9.0.1 that hasn't been caught before the
release. It's a rather serious bug as any number converted into
`Natural` with `fromIntegral` can be truncated to Word range if a
bogus rule is triggered (see #19345 and #19411 for more details).</p>
<p class="sh-color-black sh-color">It is already fixed in HEAD and the fix will be present in GHC
9.0.2 which should be released soon.</p>
<p class="sh-color-black sh-color">In the meantime you can check if the rule is triggered with
`-ddump-rule-firings`. If it shows that the following rule has
fired, then your code may be badly modified:</p>
<p class="sh-color-black sh-color"><code class="sh-color-black sh-color">Rule fired: fromIntegral/Int->Natural (GHC.Real)</code></p>
<p class="sh-color-black sh-color">(the issue is that despite its name the rule isn't correctly
constrained to convert Ints into Natural, but any numeric
type...).</p>
Sorry about that!<br/>
Sylvain
<p class="sh-color-black sh-color">#19345: <a href="https://gitlab.haskell.org/ghc/ghc/-/issues/19345" class="moz-txt-link-freetext" target="_blank" rel="noopener noreferrer">https:/<wbr/>/<wbr/>gitlab.<wbr/>haskell.<wbr/>org/<wbr/>ghc/<wbr/>ghc/<wbr/>-/<wbr/>issues/<wbr/>19345</a><br/>
#19411: <a href="https://gitlab.haskell.org/ghc/ghc/-/issues/19411" class="moz-txt-link-freetext" target="_blank" rel="noopener noreferrer">https:/<wbr/>/<wbr/>gitlab.<wbr/>haskell.<wbr/>org/<wbr/>ghc/<wbr/>ghc/<wbr/>-/<wbr/>issues/<wbr/>19411</a></p>
<p class="sh-color-black sh-color"><br/>
</p>
<p class="sh-color-black sh-color">_______________________________________________
<br/>
Haskell-Cafe mailing list
<br/>
To (un)subscribe, modify options or view archives go to:
<a target="_blank" rel="noopener noreferrer" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http:/<wbr/>/<wbr/>mail.<wbr/>haskell.<wbr/>org/<wbr/>cgi-bin/<wbr/>mailman/<wbr/>listinfo/<wbr/>haskell-cafe</a>
Only members subscribed via the mailman list are allowed to post.</p></div></div></blockquote></div></div><br/></div></div></body></html>