Use "OrCoVar" functions less

As described in #17291, we'd like to separate coercions and expressions
in a more robust fashion.
This is a small step in this direction.

- `mkLocalId` now panicks on a covar.
  Calls where this was not the case were changed to `mkLocalIdOrCoVar`.
- Don't use "OrCoVar" functions in places where we know the type is
  not a coercion.
23 jobs for master in 496 minutes and 14 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Lint
passed #222334
lint
lint-linters

00:01:27

passed #222337
lint
lint-submods-branch

00:00:23

passed #222335
lint
lint-testsuite

00:01:29

passed #222336
lint
typecheck-testsuite

00:00:20

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

00:17:40

 
  Build
passed #222340
x86_64-linux
release-x86_64-linux-deb9

01:51:33

passed #222339
x86_64-linux
validate-x86_64-linux-deb9-hadrian

03:00:23

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

04:45:20

failed #222344
armv7-linux allowed to fail
validate-armv7-linux-deb9

04:26:52

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

02:05:42

passed #222342
x86_64-darwin
validate-x86_64-darwin

01:04:27

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

04:31:03

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

01:42:08

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

01:30:56

failed #222341
x86_64-linux
validate-x86_64-linux-deb9-unreg-hadrian

02:30:39

passed #222349
x86_64-linux
validate-x86_64-linux-fedora27

02:10:06

failed #222351
x86_64-windows allowed to fail
validate-x86_64-windows

03:08:09

failed #222350
x86_64-windows allowed to fail
validate-x86_64-windows-hadrian

01:26:38

 
  Cleanup
passed #222352
x86_64-darwin
cleanup-darwin

00:00:10

 
  Packaging
skipped #222353
x86_64-linux allowed to fail
doc-tarball
 
  Testing
skipped #222354
x86_64-linux allowed to fail manual
hackage
skipped #222355
x86_64-linux
perf-nofib
 
  Deploy
skipped #222356
x86_64-linux allowed to fail
pages
 
Name Stage Failure
failed
validate-armv7-linux-deb9 Full Build
Uploading artifacts...
ghc-armv7-linux-deb9.tar.xz: found 1 matching files
junit.xml: found 1 matching files

performance-metrics.tsv: found 1 matching files

Uploading artifacts to coordinator... ok
id=222344 responseStatus=201 Created token=Z2EMc_9U
Uploading artifacts...
junit.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=222344 responseStatus=201 Created token=Z2EMc_9U
ERROR: Job failed: exit code 1
failed
validate-aarch64-linux-deb9 Full Build
Uploading artifacts...
ghc-aarch64-linux-deb9.tar.xz: found 1 matching files
junit.xml: found 1 matching files

performance-metrics.tsv: found 1 matching files

Uploading artifacts to coordinator... ok
id=222343 responseStatus=201 Created token=WNSCCrKs
Uploading artifacts...
junit.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=222343 responseStatus=201 Created token=WNSCCrKs
ERROR: Job failed: exit code 1
failed
validate-x86_64-linux-deb9-unreg-hadrian Full Build
   06babbd859..468aa3f556  refs/notes/perf -> refs/notes/perf
git notes --ref=perf append -F /builds/ghc/ghc/performance-metrics.tsv HEAD
git push git@gitlab.haskell.org:ghc/ghc-performance-notes.git refs/notes/perf
To gitlab.haskell.org:ghc/ghc-performance-notes.git
468aa3f556..70322cdec9 refs/notes/perf -> refs/notes/perf
Uploading artifacts...
junit.xml: found 1 matching files
Uploading artifacts to coordinator... ok
id=222341 responseStatus=201 Created token=rvHKp7g1
ERROR: Job failed: exit code 1
failed
validate-x86_64-windows-hadrian Full Build
ghc.tar.xz: found 1 matching files                 
WARNING: junit.xml: no matching files
WARNING: Failed to load system CertPool:crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=222350 responseStatus=201 Created token=Duyizowf
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=3060 revision=1f513601 version=11.10.1
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit status 1
failed
validate-x86_64-windows Full Build
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=222351 responseStatus=201 Created token=hvW4RsKR
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=576 revision=1f513601 version=11.10.1
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=222351 responseStatus=201 Created token=hvW4RsKR
ERROR: Job failed: exit status 2