Fix #16391 by using occCheckExpand in TcValidity

Authored by RyanGlScott on Mar 6 2019, 1:42 PM.

Description

Fix Trac #16391 by using occCheckExpand in TcValidity

The type-variables-escaping-their-scope-via-kinds check in
TcValidity was failing to properly expand type synonyms, which led
to Trac #16391. This is easily fixed by using occCheckExpand before
performing the validity check.

Along the way, I refactored this check out into its own function,
and sprinkled references to Notes to better explain all of the moving
parts. Many thanks to @simonpj for the suggestions.

Bumps the haddock submodule.

Details

Committed
Marge Bot <ben+marge-bot@smart-cactus.org>Mar 7 2019, 1:07 PM
Parents
rGHC7a68254a7284: Fix #16392: revertCAFs in external interpreter when necessary
Branches
Unknown
Tags
Unknown
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC068b7e983f4a: Fix #16391 by using occCheckExpand in TcValidity (authored by RyanGlScott).Mar 7 2019, 1:07 PM