Do more validity checks for quantified constraints

Close #17583.

Test case: typecheck/should_fail/T17563
23 jobs for master
Status Job ID Name Coverage
  Lint
canceled #222357
lint
lint-linters

canceled #222360
lint
lint-submods-branch

canceled #222358
lint
lint-testsuite

canceled #222359
lint
typecheck-testsuite

 
  Quick Build
canceled #222361
x86_64-linux
hadrian-ghc-in-ghci

 
  Build
canceled #222363
x86_64-linux
release-x86_64-linux-deb9

canceled #222362
x86_64-linux
validate-x86_64-linux-deb9-hadrian

 
  Full Build
canceled #222366
aarch64-linux allowed to fail
validate-aarch64-linux-deb9

canceled #222367
armv7-linux allowed to fail
validate-armv7-linux-deb9

canceled #222368
x86_64-linux
validate-i386-linux-deb9

canceled #222365
x86_64-darwin
validate-x86_64-darwin

canceled #222369
x86_64-linux
validate-x86_64-linux-deb9-debug

canceled #222371
x86_64-linux
validate-x86_64-linux-deb9-dwarf

canceled #222370
x86_64-linux
validate-x86_64-linux-deb9-integer-simple

canceled #222364
x86_64-linux
validate-x86_64-linux-deb9-unreg-hadrian

canceled #222372
x86_64-linux
validate-x86_64-linux-fedora27

canceled #222374
x86_64-windows allowed to fail
validate-x86_64-windows

canceled #222373
x86_64-windows allowed to fail
validate-x86_64-windows-hadrian

 
  Cleanup
canceled #222375
x86_64-darwin
cleanup-darwin

 
  Packaging
canceled #222376
x86_64-linux allowed to fail
doc-tarball

 
  Testing
canceled #222377
x86_64-linux allowed to fail manual
hackage

canceled #222378
x86_64-linux
perf-nofib

 
  Deploy
canceled #222379
x86_64-linux allowed to fail
pages