Handle promoted data constructors in typeToLHsType correctly
Instead of using `nlHsTyVar`, which hardcodes `NotPromoted`, have `typeToLHsType` pick between `Promoted` and `NotPromoted` by checking if a type constructor is promoted using `isPromotedDataCon`. Fixes #18020.
Showing
- compiler/GHC/Hs/Utils.hs 6 additions, 1 deletioncompiler/GHC/Hs/Utils.hs
- testsuite/tests/deriving/should_compile/T14578.stderr 15 additions, 15 deletionstestsuite/tests/deriving/should_compile/T14578.stderr
- testsuite/tests/deriving/should_compile/T14579.stderr 6 additions, 6 deletionstestsuite/tests/deriving/should_compile/T14579.stderr
- testsuite/tests/deriving/should_fail/T15073.stderr 1 addition, 1 deletiontestsuite/tests/deriving/should_fail/T15073.stderr
Loading
Please register or sign in to comment