summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simon.peytonjones@gmail.com>2023-02-07 22:14:56 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-02-16 10:17:46 -0500
commit12965aba860676ec68cbced86eb18d6ec5cb83b3 (patch)
tree41985303917dfa8b42e8c2fe68e93b33715691c4 /docs
parent34cd308e23206e71b48e205970741746ed66ea8e (diff)
downloadhaskell-12965aba860676ec68cbced86eb18d6ec5cb83b3.tar.gz
Narrow the dont-decompose-newtype test
Following #22924 this patch narrows the test that stops us decomposing newtypes. The key change is the use of noGivenNewtypeReprEqs in GHC.Tc.Solver.Canonical.canTyConApp. We went to and fro on the solution, as you can see in #22924. The result is carefully documented in Note [Decomoposing newtype equalities] On the way I had revert most of commit 3e827c3f74ef76d90d79ab6c4e71aa954a1a6b90 Author: Richard Eisenberg <rae@cs.brynmawr.edu> Date: Mon Dec 5 10:14:02 2022 -0500 Do newtype unwrapping in the canonicaliser and rewriter See Note [Unwrap newtypes first], which has the details. It turns out that (a) 3e827c3f makes GHC behave worse on some recursive newtypes (see one of the tests on this commit) (b) the finer-grained test (namely noGivenNewtypeReprEqs) renders 3e827c3f unnecessary
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions