<div dir="ltr">Hi Ben!<div><br></div><div>I concreted some points in local warnings suppression pragmas wiki page with specification.</div><div><a href="https://ghc.haskell.org/trac/ghc/wiki/Design/LocalWarningPragmas">https://ghc.haskell.org/trac/ghc/wiki/Design/LocalWarningPragmas</a><br></div><div>Do you know something about defining custom pragmas in GHC?</div><div>I suppose, i need to add it to the lexer and parser.</div><div>In that case, how can i understand, that GHC recognizes my pragma?</div><div>I want to try a few things on my local machine</div><div><br></div><div>Thanks in advance!</div><div>Cheers!   </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-27 2:35 GMT+03:00 Howard B. Golden <span dir="ltr"><<a href="mailto:howard_b_golden@yahoo.com" target="_blank">howard_b_golden@yahoo.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On US TV, Archie Bunker said "Stifle!"<br>
<span class="HOEnZb"><font color="#888888"><br>
Howard<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Oct 26, 2015, at 1:59 PM, Alexey Shmalko <<a href="mailto:rasen.dubi@gmail.com">rasen.dubi@gmail.com</a>> wrote:<br>
><br>
> Hi!<br>
><br>
> I think SUPPRESS could be enough.<br>
><br>
> Hope this helps<br>
><br>
> On Mon, Oct 26, 2015 at 8:59 PM, Эдгар Жаворонков<br>
> <<a href="mailto:edzhavoronkov@gmail.com">edzhavoronkov@gmail.com</a>> wrote:<br>
>> Hi Ben!<br>
>> Thanks for your feedback<br>
>> I thought a little and fixed some in wiki page<br>
>><br>
>> In my opinion SUPPRESS_WARNINGS is not a real long name for pragma, but i<br>
>> can't come up with whort name that clearly describes purpose of such pragma<br>
>> =(<br>
>> Your suggestions are really welcome)<br>
>><br>
>> ---<br>
>> С уважением,<br>
>> Жаворонков Эдгар<br>
>><br>
>> Best regards,<br>
>> Edgar A. Zhavoronkov<br>
>><br>
>> 2015-10-26 19:45 GMT+03:00 Ben Gamari <<a href="mailto:ben@well-typed.com">ben@well-typed.com</a>>:<br>
>>><br>
>>> Эдгар Жаворонков <<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<br>
>>>> it<br>
>>> 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>
>><br>
>> _______________________________________________<br>
>> ghc-devs mailing list<br>
>> <a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
> _______________________________________________<br>
> ghc-devs mailing list<br>
> <a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</div></div></blockquote></div><br></div>