Fix OptCoercion
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 2 Jan 2018 17:25:58 +0000 (17:25 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 3 Jan 2018 11:26:20 +0000 (11:26 +0000)
commit9e5535ca667e060ce1431d42cdfc3a13ae080a88
treea5c4d04e651397eeb059e4a539c57e82f8aab779
parent112266ce62e4fa831b21038be72f8b9ecdf6bfcf
Fix OptCoercion

In the presence of -fdefer-type-errors, OptCoercion can
encounter a mal-formed coerercion with type
    T a ~ T a b
and that was causing a subsequent Lint error.

This caused Trac #14607.  Easily fixed by turning an ASSERT
into a guard.
compiler/types/OptCoercion.hs
testsuite/tests/typecheck/should_fail/T14607.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T14607.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T