<div dir="ltr">I think using the words error and warning makes sense. For example, this is how Clang (LLVM) does it:<div><br></div><div><font face="monospace, monospace">format-strings.c:91:13: warning: '.*' specified field precision is missing a matching 'int' argument<br></font></div><div><font face="monospace, monospace">  printf("%.*d");<br></font></div><div><font face="monospace, monospace">            ^<br></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">t.c:7:39: error: invalid operands to binary expression ('int' and 'struct A')<br></font></div><div><font face="monospace, monospace">  return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X);<br></font></div><div><font face="monospace, monospace">                       ~~~~~~~~~~~~~~ ^ ~~~~~</font><br></div><div><br></div><div>(Also note how lovely it is to have a caret pointing at the error.)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 9, 2015 at 10:39 AM, Simon Peyton Jones <span dir="ltr"><<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif">Alan’s point is a bug – I will fix.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif">Konstantine’s point is reasonable.  we could easily say<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal">Language/Haskell/Refact/Utils/TypeUtils.hs:3045:7: <span style="color:red">
Error</span>:<br>
<span style="font-family:"Calibri",sans-serif">     blah blah<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif">(the bit in red is the new bit)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif">But I’m not sure that everyone else would want that.   If a consensus forms it would be easy to excecute<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif">I suppose there could be yet another flag to control it (!)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif">Simon<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Konstantine Rybnikov [mailto:<a href="mailto:k-bx@k-bx.com" target="_blank">k-bx@k-bx.com</a>]
<br>
<b>Sent:</b> 09 January 2015 09:19<br>
<b>To:</b> Alan & Kim Zimmerman<br>
<b>Cc:</b> <a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a>; Simon Peyton Jones<br>
<b>Subject:</b> Re: warn-redundant-constraints present as errors<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
On a slightly unrelated note I should say it would be great to have errors contain word "Error:". This is especially nice to have because when you build with "-j" your error that stops compilation gets lost somewhere in the middle of many warnings (which my
 projects have, unfortunately).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
On Thu, Jan 8, 2015 at 11:45 PM, Alan & Kim Zimmerman <<a href="mailto:alan.zimm@gmail.com" target="_blank">alan.zimm@gmail.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm">
This is a great feature, here is some feedback<br>
<br>
My syntax highlighter in emacs expects warnings to have the word "warning" in them.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm">
So for the two warnings reported below, the first is highlighted as an error, and the second as a warning<br>
<br>
<br>
Language/Haskell/Refact/Utils/TypeUtils.hs:3036:17:<br>
    Redundant constraint: SYB.Data t<br>
    In the type signature for:<br>
       duplicateDecl :: SYB.Data t =><br>
                        [GHC.LHsBind GHC.Name]<br>
                        -> t -> GHC.Name -> GHC.Name -> RefactGhc [GHC.LHsBind GHC.Name]<br>
<br>
Language/Haskell/Refact/Utils/TypeUtils.hs:3045:7: Warning:<br>
    Defined but not used: ‘toks<br>
<br>
<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm">
This is in a ghci session, and the file loads without problems, so it is indeed a warning.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm">
Can we perhaps add the word "Warning" to the output for Redundant constraints?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm">
I also had a situation where it asked me to remove a whole lot of constraints from different functions, I did them in batches, so did not remove them all from the file at once, and at some point I had to add at least one of them back, albeit based on an error
 message.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<u></u> <u></u></p>
</div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
Regards<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<span><span style="color:#888888">  Alan</span></span><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm">
<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>

<br>_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
<br></blockquote></div><br></div>