<div dir="ltr">Hi Ben!<div>Thanks for your feedback</div><div>I thought a little and fixed some in wiki page</div><div><br></div><div>In my opinion SUPPRESS_WARNINGS is not a real long name for pragma, but i can't come up with whort name that clearly describes purpose of such pragma =(</div><div>Your suggestions are really welcome)</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>---</div>С уважением,<div>Жаворонков Эдгар</div><div><br></div><div>Best regards,</div><div>Edgar A. Zhavoronkov</div></div></div></div></div></div></div>
<br><div class="gmail_quote">2015-10-26 19:45 GMT+03:00 Ben Gamari <span dir="ltr"><<a href="mailto:ben@well-typed.com" target="_blank">ben@well-typed.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Эдгар Жаворонков <<a href="mailto:edzhavoronkov@gmail.com">edzhavoronkov@gmail.com</a>> writes:<br>
<br>
> Hello Richard!<br>
><br>
> Can you take a look at some sort of specification i wrote week ago?<br>
> I placed it here:<br>
> <a href="https://ghc.haskell.org/trac/ghc/wiki/Design/LocalWarningPragmas" rel="noreferrer" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/Design/LocalWarningPragmas</a><br>
> I can imagine only two use cases, and i'm not sure about correcteness of it<br>
><br>
</span>Thanks for writing this up!<br>
<br>
The specification is a good start but it really needs more detail. For<br>
instance, what syntactic elements do you want this pragma to apply to?<br>
Bindings? Expressions? Top-level definitions like classes, types, and<br>
instances? Any lexical scope?<br>
<br>
It would be nice if the use-cases you mention were a bit more concrete.<br>
It wouldn't hurt to mention particular warnings that you might imagine<br>
that this would be useful for.<br>
<br>
It would likely be useful to draw inspiration from some of the schemes<br>
used by other languages listed on the ticket (Rust and C# IIRC). It<br>
wouldn't hurt to draw attention to the similarities and differences to<br>
these other schemes in the proposal text.<br>
<br>
On a more bike-shed-y note, `SUPPRESS_WARNINGS` is arguably a bit on the<br>
long side.<br>
<br>
Personally I would prefer not to see the pragma be bracketed as you<br>
propose in your last example as its effect then becomes quite<br>
"non-local". This pragma should, in my opinion, be a tool of precision,<br>
used sparingly for well-understood reasons. Allowing bracketed regions<br>
makes it too easy for definitions to "sneak in" to the supressed region,<br>
hiding legitimate warnings. In the interest of keeping the proposal<br>
concrete and concise I would either remove this alternative or move it<br>
to a dedicated "Alternatives" section.<br>
<br>
I'm looking forward to seeing what becomes of this. You might consider<br>
submitting the next iteration of the proposal to the Haskell subreddit<br>
to get a few more eyes on it. Onwards!<br>
<br>
Cheers,<br>
<br>
- Ben<br>
<br>
</blockquote></div><br></div>