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)
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Sat, 21 Jul 2018 13:49:54 +0000 (15:49 +0200)
commitb202e7a48401bd8e805a92dcfe5ea059cbd8e41c
treee95a8807428f3d6de5cf89d5f005ce3f3d87f8e7
parentf64f06bebddd1dbfc6568f36fa1f91f758fa22f1
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
compiler/typecheck/TcHoleErrors.hs