Fix Uncovered set of literal patterns

Authored by sgraf on Apr 1 2019, 12:59 PM.

Description

Fix Uncovered set of literal patterns

Issues Trac #16289 and Trac #15713 are proof that the pattern match checker did
an unsound job of estimating the value set abstraction corresponding to
the uncovered set.

The reason is that the fix from Trac #11303 introducing NLit was
incomplete: The LitCon case desugared to Var rather than LitVar,
which would have done the necessary case splitting analogous to the
ConVar case.

This patch rectifies that by introducing the fresh unification variable
in LitCon in value abstraction position rather than pattern postition,
recording a constraint equating it to the constructor expression rather
than the literal. Fixes Trac #16289 and Trac #15713.

Details

Committed
Marge Bot <ben+marge-bot@smart-cactus.org>Apr 3 2019, 3:03 AM
Parents
rGHC7b090b53fea0: configure: Always use AC_LINK_ELSEIF when testing against assembler
Branches
Unknown
Tags
Unknown
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC4626cf213fe7: Fix Uncovered set of literal patterns (authored by sgraf).Apr 3 2019, 3:03 AM