Fix #17021 by checking more return kinds

All the details are in new Note [Datatype return kinds] in
TcTyClsDecls.

Test case: typecheck/should_fail/T17021{,b}
           typecheck/should_compile/T17021a

Updates haddock submodule
24 jobs for master in 544 minutes and 23 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Lint
passed #284649
lint
lint-linters

00:00:13

passed #284652
lint
lint-submods-branch

00:00:16

passed #284650
lint
lint-testsuite

00:00:15

passed #284651
lint
typecheck-testsuite

00:00:14

 
  Quick Build
passed #284653
x86_64-linux
hadrian-ghc-in-ghci

00:08:35

 
  Build
passed #284654
x86_64-linux
validate-x86_64-linux-deb9-hadrian

03:07:21

 
  Full Build
failed #284657
aarch64-linux allowed to fail
validate-aarch64-linux-deb9

03:56:59

passed #284658
armv7-linux
validate-armv7-linux-deb9

03:45:23

passed #284659
x86_64-linux
validate-i386-linux-deb9

01:50:42

failed #284666
new-x86_64-windows test allowed to fail
validate-i386-windows

00:01:03

passed #284656
x86_64-darwin
validate-x86_64-darwin

01:09:58

passed #284660
x86_64-linux
validate-x86_64-linux-deb9-debug

02:17:11

passed #284662
x86_64-linux
validate-x86_64-linux-deb9-dwarf

02:03:28

passed #284661
x86_64-linux
validate-x86_64-linux-deb9-integer-simple

01:08:51

passed #284655
x86_64-linux
validate-x86_64-linux-deb9-unreg-hadrian

02:22:08

passed #284663
x86_64-linux
validate-x86_64-linux-fedora27

01:05:53

failed #284665
new-x86_64-windows test allowed to fail
validate-x86_64-windows

03:10:17

failed #284664
new-x86_64-windows test allowed to fail
validate-x86_64-windows-hadrian

00:44:35

 
  Cleanup
passed #284667
x86_64-darwin
cleanup-darwin

00:00:27

 
  Packaging
passed #284668
x86_64-linux
doc-tarball

00:03:44

 
  Testing
manual #284669
x86_64-linux allowed to fail manual
hackage
passed #284670
x86_64-linux
perf-nofib

00:24:15

 
  Deploy
passed #284671
x86_64-linux
pages

00:01:36

failed pages:deploy

00:00:00

 
Name Stage Failure
failed
validate-x86_64-windows-hadrian Full Build
Git branch:   12-6-stable
GO version: go1.13.4
Built: 2019-12-22T11:55:34+0000
OS/Arch: windows/amd64
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=404 revision=ac8e767a version=12.6.0
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit status 1
failed
validate-i386-windows Full Build
Git branch:   12-6-stable
GO version: go1.13.4
Built: 2019-12-22T11:55:34+0000
OS/Arch: windows/amd64
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=3888 revision=ac8e767a version=12.6.0
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit status 1
failed
validate-aarch64-linux-deb9 Full Build
=====> T13097(normal) 7161 of 7403 [0, 103, 8]
cd "libraries/base/tests/T13097.run" && "/builds/ghc/ghc/inplace/bin/ghc-stage2" -o T13097 T13097.hs -dcore-lint -dstg-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -Werror=compat -dno-debug-output <
cd "libraries/base/tests/T12874.run" && ./T12874 <
=====> functorOperators(normal) 7162 of 7403 [0, 103, 8]
cd "libraries/base/tests/functorOperators.run" && "/builds/ghc/ghc/inplace/bin/ghc-stage2" -o functorOperators functorOperators.hs -dcore-lint -dstg-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -Werror=compat -dno-debug-output <
cd "libraries/base/tests/T11760.run" && ./T11760 <
cd "libraries/base/tests/T13525.run" && ./T13525 <
=====> T3474(normal) 7163 of 7403 [0, 103, 8]
cd "libraries/base/tests/T3474.run" && "/builds/ghc/ghc/inplace/bin/ghc-stage2" -o T3474
Job's log exceeded limit of 16384000 bytes.
failed
validate-x86_64-windows Full Build
GO version:   go1.13.4
Built: 2019-12-22T11:55:34+0000
OS/Arch: windows/amd64
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=2632 revision=ac8e767a version=12.6.0
junit.xml: found 1 matching files

WARNING: Failed to load system CertPool: crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=284665 responseStatus=201 Created token=BdsbAPKj
ERROR: Job failed: exit status 1