summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcGenFunctor.hs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2019-06-15 20:21:34 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-23 17:20:41 -0400
commit9bbcc3be51180dcefde0c89daf8ad6f69c680b40 (patch)
tree48f73da9fec88627232dbddbef7221e268085849 /compiler/typecheck/TcGenFunctor.hs
parent5a502cd1431b535a12dced0479b75c5f7dbfb01c (diff)
downloadhaskell-9bbcc3be51180dcefde0c89daf8ad6f69c680b40.tar.gz
Refactor UnliftedNewtypes-relation kind signature validity checks
This fixes three infelicities related to the programs that are (and aren't) accepted with `UnliftedNewtypes`: * Enabling `UnliftedNewtypes` would permit newtypes to have return kind `Id Type`, which had disastrous results (i.e., GHC panics). * Data family declarations ending in kind `TYPE r` (for some `r`) weren't being accepted if `UnliftedNewtypes` wasn't enabled, despite the GHC proposal specifying otherwise. * GHC wasn't warning about programs that _would_ typecheck if `UnliftedNewtypes` were enabled in certain common cases. As part of fixing these issues, I factored out the logic for checking all of the various properties about data type/data family return kinds into a single `checkDataKindSig` function. I also cleaned up some of the formatting in the existing error message that gets thrown. Fixes #16821, fixes #16827, and fixes #16829.
Diffstat (limited to 'compiler/typecheck/TcGenFunctor.hs')
0 files changed, 0 insertions, 0 deletions