Fix the TcLevel not being set correctly when finding valid hole fits
authorMatthías Páll Gissurarson <mpg@mpg.is>
Sat, 21 Jul 2018 13:48:53 +0000 (15:48 +0200)
committerBen Gamari <ben@smart-cactus.org>
Mon, 6 Aug 2018 22:23:35 +0000 (18:23 -0400)
commitf4e54330d14c1601128d6ab3750a10709c05a427
tree01cdf6e776aec1c313b0b4be9370d4ef2121289c
parent26b6ffb3d5a66dc821635cdca8d9ce8dc2960c35
Fix the TcLevel not being set correctly when finding valid hole fits

Summary:
This fixes the problem revealed by a new assert as it relates to valid
hole fits. However, tests `T10384`, `T14040a` and `TcStaticPointersFail02`
still fail the assert, but they are unrelated to valid hole fits.

Reviewers: bgamari, simonpj

Reviewed By: simonpj

Subscribers: simonpj, rwbarton, thomie, carter

GHC Trac Issues: #15384

Differential Revision: https://phabricator.haskell.org/D4994

(cherry picked from commit b202e7a48401bd8e805a92dcfe5ea059cbd8e41c)
compiler/typecheck/TcHoleErrors.hs