Performance of pattern checker on OptCoercions

Thomas Miedema thomasmiedema at gmail.com
Sat Dec 19 18:52:23 UTC 2015


On Mon, Dec 14, 2015 at 3:03 PM, Richard Eisenberg <eir at cis.upenn.edu>
wrote:

> 1. -fwarn-pattern-guards=none
> 2. -fwarn-pattern-guards=try
> 3. -fwarn-pattern-guards=try-quiet
> 4. -fwarn-pattern-guards=do   -- there is no "try"
>

The implementation
<https://phabricator.haskell.org/rGHC7e216050ce0366a1d2c2a971db457a5d49f60e8a>
now
uses:
1. -guard-reasoning=simple
2. -guard-reasoning=try
3. -guard-reasoning=try-quiet
4. -guard-reasoning=do

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
(`-Wornate-guards`,
using the new syntax from #11218), enabled by default. When 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!).

So then it would like this (with `-f` prefix preferable):
1. -fguard-reasoning=simple
2. -fguard-reasoning=try
3. -fguard-reasoning=do

And orthogonal to that: -Wornate-guards / -Wno-ornate-guards (name to be
decided), which only have an effect when `-fguard-reasoning=try` (the
default).

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20151219/a3963fa7/attachment.html>


More information about the ghc-devs mailing list