Expand type synonyms during role inference
authorRyan Scott <ryan.gl.scott@gmail.com>
Sat, 12 Aug 2017 19:52:08 +0000 (15:52 -0400)
committerRyan Scott <ryan.gl.scott@gmail.com>
Sat, 12 Aug 2017 19:52:09 +0000 (15:52 -0400)
commit0bb1e84034a12d7f700b48fca6710c01bd08f397
treea3fc50116f19566baf68365785655a003217c834
parent4f1f9868ae79b5730c6aa14b05394d3f1d10a857
Expand type synonyms during role inference

Summary:
During role inference, we need to expand type synonyms, since
oversaturated applications of type synonym tycons would otherwise have overly
conservative roles inferred for its arguments.

Fixes #14101.

Test Plan: ./validate

Reviewers: goldfire, austin, bgamari

Reviewed By: goldfire

Subscribers: rwbarton, thomie

GHC Trac Issues: #14101

Differential Revision: https://phabricator.haskell.org/D3838
compiler/typecheck/TcTyClsDecls.hs
compiler/typecheck/TcTyDecls.hs
compiler/types/Coercion.hs