On Dec 17, 2015, at 8:15 AM, George Karachalias <george.karachalias@gmail.com> 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:
  1. -fwarn-pattern-guards           ==> Give it your best
  2. -fwarn-ignore-pattern-guards ==> Do not run the check on the cases with many guards without a warning
  3. 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?

Richard