Use transSuperClasses in TcErrors
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 11 Mar 2019 10:02:31 +0000 (10:02 +0000)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Tue, 12 Mar 2019 13:13:28 +0000 (09:13 -0400)
commit50249a9f652ae3440e9462fdc9914edc924091f1
tree013e20f8e82ecc722b85a28a42ae630e12d5803c
parent5165378d87602a8ce24776d220039fc05075d31f
Use transSuperClasses in TcErrors

Code in TcErrors was recursively using immSuperClasses,
which loops in the presence of UndecidableSuperClasses.

Better to use transSuperClasses instead, which has a loop-breaker
mechanism built in.

Fixes issue #16414.
compiler/typecheck/TcErrors.hs
compiler/typecheck/TcType.hs
testsuite/tests/typecheck/should_fail/T16414.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T16414.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T