Performance of pattern checker on OptCoercions

Richard Eisenberg eir at
Thu Dec 17 18:16:28 UTC 2015

On Dec 17, 2015, at 8:15 AM, George Karachalias <george.karachalias at> wrote:

> What do you think? I have already implemented a first patch with two options: If the number of
> guards is small run the check and say nothing. If not, check for 2 possible flags:
> -fwarn-pattern-guards           ==> Give it your best
> -fwarn-ignore-pattern-guards ==> Do not run the check on the cases with many guards without a warning
> None of the two enabled?     ==> Give a warning of the form:
> T783.hs:4:1: warning:
>     Pattern match checking failed for an equation for foo
>     due to the big number of guards
>       (Use -fwarn-ignore-pattern-guards if you want to hide this message
>        or -fwarn-pattern-guards if you want the checker to run no matter what)
I don't have much comment on your implementation techniques, as I don't know this end of the operation well enough to have an opinion.

For the point above: what if both flags are enabled?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list