<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Dec 14, 2015 at 3:03 PM, 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">1. -fwarn-pattern-guards=none<br>
2. -fwarn-pattern-guards=try<br>
3. -fwarn-pattern-guards=try-quiet<br>
4. -fwarn-pattern-guards=do   -- there is no "try"<br></blockquote><div><br></div><div>The <a href="https://phabricator.haskell.org/rGHC7e216050ce0366a1d2c2a971db457a5d49f60e8a">implementation</a> now uses: </div>1. -guard-reasoning=simple<br>2. -guard-reasoning=try<br>3. -guard-reasoning=try-quiet<br>4. -guard-reasoning=do<div><br></div><div>Since `try-quiet` suppresses a warning, it seems more consistent with the rest of the warning machinery to have a separate warning flag for it (`<span style="font-size:12.8px">-Wornate-guards`, using the new syntax from #11218), enabled by default. When </span>the fine-grained `-Werror=...` facility is implemented (#11219), this would allow you to for example say `-Werror -Wno-error=ornate-guards`, meaning: turn all warnings into errors, except for `-Wornate-guards` (but don't silence those completely!).</div><div><br></div><div>So then it would like this (with `-f` prefix preferable):</div><div>1. -fguard-reasoning=simple<br>2. -fguard-reasoning=try<br>3. -fguard-reasoning=do<br></div><div><br></div><div>And orthogonal to that: <span style="font-size:12.8px">-Wornate-guards / -Wno-ornate-guards (name to be decided), which only have an effect when `-fguard-reasoning=try` (the default).</span></div><div><br></div><div>Thomas</div><div><br></div></div></div></div>