Make `singleConstructor` cope with pattern synonyms
Previously, singleConstructor
didn't handle singleton COMPLETE
sets
of a single pattern synonym, resulting in incomplete pattern warnings.
This is fixed by making singleConstructor
(now named
singleMatchConstructor
) query allCompleteMatches
, necessarily making
it effectful. As a result, most of this patch is concerned with
threading the side-effect through to singleMatchConstructor
.