Fix #14729 by making the normaliser homogeneous

Authored by goldfire on Jan 24 2019, 9:22 AM.

Description

Fix Trac #14729 by making the normaliser homogeneous

This ports the fix to Trac #12919 to the normaliser. (Trac #12919 was about
the flattener.) Because the fix is involved, this is done by
moving the critical piece of code to Coercion, and then calling
this from both the flattener and the normaliser.

The key bit is: simplifying type families in a type is always
a *homogeneous* operation. See Trac #12919 for a discussion of why
this is the Right Way to simplify type families.

Also fixes Trac #15549.

test case: dependent/should_compile/T14729{,kind}

typecheck/should_compile/T15549[ab]

Details

Committed
Marge Bot <ben+marge-bot@smart-cactus.org>Feb 8 2019, 9:59 AM
Parents
rGHCaad05fb3b36b: testsuite: Mark T5515 as broken with debugged compiler
Branches
Unknown
Tags
Unknown