Fix #15787 by squashing a coercion hole.

Authored by goldfire on Oct 28 2018, 3:06 PM.

Description

Fix Trac #15787 by squashing a coercion hole.

In type-incorrect code, we can sometimes let a coercion
hole make it through the zonker. If this coercion hole then
ends up in the environment (e.g., in the type of a data
constructor), then it causes trouble later.

This patch avoids trouble by substituting the coercion hole
for its representative CoVar. Really, any coercion would do,
but the CoVar was very handy.

test case: polykinds/T15787

(cherry picked from commit 4427315a65b25db22e1754d41b43dd4b782b022f)

Details

Committed
bgamariNov 2 2018, 9:59 AM
Parents
rGHCcfc3ad1fabe6: users-guide: Fix version number
Branches
Unknown
Tags
Unknown