<div dir="ltr">Nice idea! I didn't know reportWarning existed. Very cool.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 May 2015 at 04:47, Richard Eisenberg <span dir="ltr"><<a href="mailto:eir@cis.upenn.edu" target="_blank">eir@cis.upenn.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-1<br>
<br>
I like the idea of having GHC spit out warnings and such of this form, but this is so straightforward to do with Template Haskell:<br>
<br>
$([] <$ reportWarning "Fix this function!")<br>
<br>
You could do something similar in terms, spitting out `id` instead of an empty list of declarations. (You'd have to be careful where you do this, admittedly.)<br>
<br>
If it's this easy to do in userland without affecting the compiler, let's do it that way. And, even better, with some library support, you could customize this behavior in all sorts of ways.<br>
<br>
Richard<br>
<div><div class="h5"><br>
On May 17, 2015, at 4:10 PM, Roman Cheplyaka <<a href="mailto:roma@ro-che.info">roma@ro-che.info</a>> wrote:<br>
<br>
> On 17/05/15 19:42, Christopher Done wrote:<br>
>> What's the feeling on having a FIXME pragma so that I can attach<br>
>> warnings to unfinished things?<br>
>><br>
>> |{-# FIXME foo "Reasons here." #-}|<br>
>><br>
>> I would use the WARNING pragma but that doesn't work within a module and<br>
>> only triggers on use. Compiler errors are the one thing I and everyone<br>
>> else pays attention to, it would be very handy to have more control over<br>
>> things GHC reports to the developer to aid development.<br>
><br>
> +1. I actively use WARNING in such cases, and I'd prefer the warning to<br>
> be reported at the definition site.<br>
><br>
> It'd also be great to allow this pragma anywhere in the code, but I<br>
> realize it'd complicate the parser.<br>
><br>
> Roman<br>
><br>
</div></div>> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
<br>
</blockquote></div><br></div>