Simplify Data.Type.Equality.==
authorDavid Feuer <david.feuer@gmail.com>
Wed, 13 Sep 2017 16:25:11 +0000 (12:25 -0400)
committerBen Gamari <ben@smart-cactus.org>
Wed, 13 Sep 2017 20:45:49 +0000 (16:45 -0400)
commit4be195e707d5e079dca5b6ce2e6cd34ff7624adf
tree17ed15746a0f1770d981f4e3c9674978edf91433
parentf9bf621caf2fc17d829dee0ee48b204144927e72
Simplify Data.Type.Equality.==

Contrary to previous comments, we can calculate `==` for types
in an extremely general fashion. The approach used here is actually
the one mistakenly rejected as impossible. There will be some cases
when the previous version was able to reduce and this one is not,
particularly for types in `*` that are unknown, but known equal.
However, the new behavior is much more uniform. Within the
established framework of equality testing by pattern matching,
it does a better job than the previous version.

Reviewers: goldfire, austin, hvr, bgamari, RyanGlScott

Reviewed By: RyanGlScott

Subscribers: RyanGlScott, rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3835
docs/users_guide/8.4.1-notes.rst
libraries/base/Data/Either.hs
libraries/base/Data/Type/Equality.hs
libraries/base/GHC/TypeLits.hs
libraries/base/GHC/TypeNats.hs
libraries/base/changelog.md