Take COMPLETE pragmas into account when computing whether a pattern is fallible in the typechecker
This MR addresses #15681 (closed)
It ensures we take COMPLETE pragmas into account when we are computing whether a pattern is fallible in the typechecker (not in the pattern match checker).
It's still a conservative check, but catches the common cases in which we were unnecessarily requiring MonadFail
constraints, e.g.
{-# COMPLETE C #-}
pattern C a = ...
blah = do { C x <- ... }
now no longer requires a MonadFail
constraint.
Edited by sheaf