diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2017-08-14 20:53:57 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-08-14 21:32:11 -0400 |
commit | ad7b945257ea262e3f6f46daa4ff3e451aeeae0b (patch) | |
tree | 4e6d15f220da4245b7f36efb208a7521ab34e660 /utils | |
parent | 7c37ffe8f0acd2f72e3d3aeeb517991fa7d45a16 (diff) | |
download | haskell-ad7b945257ea262e3f6f46daa4ff3e451aeeae0b.tar.gz |
Fix #14060 by more conservatively annotating TH-reified types
Before, TH was quite generous in applying kind annotations to reified
type constructors whose result kind happened to mention type variables.
This could result in agonizingly large reified types, so this patch aims
to quell this a bit by adopting a more nuanced algorithm for determining
when a tycon application deserves a kind annotation.
This implements the algorithm laid out in
https://ghc.haskell.org/trac/ghc/ticket/14060#comment:1. I've updated
`Note [Kind annotations on TyConApps]` to reflect the new wisdom.
Essentially, instead of only checking if the result kind contains free
variables, we also check if any of those variables do not appear free in
injective positions in the argument kinds—only then do we put on a kind
annotation.
Bumps `haddock` submodule.
Test Plan: make test TEST=T14060
Reviewers: goldfire, austin, bgamari
Reviewed By: goldfire
Subscribers: rwbarton, thomie
GHC Trac Issues: #14060
Differential Revision: https://phabricator.haskell.org/D3807
Diffstat (limited to 'utils')
m--------- | utils/haddock | 0 |
1 files changed, 0 insertions, 0 deletions
diff --git a/utils/haddock b/utils/haddock -Subproject 7cecbd969298d5aa576750864a69fa5f70f71c3 +Subproject c8a01b83be52e45d3890db173ffe7b09ccd4f35 |