<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Just a miscellaneous Haskell user, but that also sounds good to
      me.</p>
    <p>I definitely support having a way to tell the compiler at the
      most specific level possible (per line, in this case) that the
      author is intentionally doing this and not to warn about it.</p>
    <p>I wrote in scala for years and was always unhappy that for a very
      long time the designers refused to support [1] ( a scala version
      of Java's @SuppressWarnings annotation. The suggested hack for
      about a decade was to use a compiler plugin. </p>
    <hr width="100%" size="2">
    <p><br>
    </p>
    <p>Unrelated/on the importance of warning about the right things:<br>
    </p>
    <p>Thinking about this made me remember that C's switch
      fall-through-by-default behavior is so bad that you need to tell
      the compiler you actually want to do that. [2] [3]<br>
    </p>
    <p>[1]
<a class="moz-txt-link-freetext" href="https://stackoverflow.com/questions/3506370/is-there-an-equivalent-to-suppresswarnings-in-scala">https://stackoverflow.com/questions/3506370/is-there-an-equivalent-to-suppresswarnings-in-scala</a></p>
    <p>[2]
      <a class="moz-txt-link-freetext" href="https://learn.microsoft.com/en-us/cpp/code-quality/c26819?view=msvc-170">https://learn.microsoft.com/en-us/cpp/code-quality/c26819?view=msvc-170</a><br>
    </p>
    <p>[3]
      <a class="moz-txt-link-freetext" href="https://en.cppreference.com/w/c/language/attributes/fallthrough">https://en.cppreference.com/w/c/language/attributes/fallthrough</a><br>
    </p>
    <div class="moz-cite-prefix">On 1/25/23 21:24, Kazu Yamamoto (山本和彦)
      via Haskell-Cafe wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20230126.142408.1531339897722495380.kazu@iij.ad.jp">
      <pre class="moz-quote-pre" wrap="">Hi David,

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">It seems to me that instead of working around this, we should add a pragma
to suppress the warning at the pattern site. Maybe something like

let
  {-# PARTIAL_MATCH #-}
  Just a = blah blah

That way GHC can see that you noticed the partial match and that you're
okay with it.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
This sounds lovely to me!

--Kazu


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
Only members subscribed via the mailman list are allowed to post.</pre>
    </blockquote>
  </body>
</html>