Fix INLINE pragmas in desugarer

In #19969 we discovered that GHC has has a bug *forever* that means it
sometimes essentially discarded INLINE pragams.  This happened when you have
* Two more more mutually recursive functions
* Some of which (presumably not all!) have an INLINE pragma
* Completely monomorphic.

This hits a particular case in GHC.HsToCore.Binds.dsAbsBinds, which was
simply wrong -- it put the INLINE pragma on the wrong binder.

This patch fixes the bug, rather easily, by adjusting the
no-tyvar, no-dict case of GHC.HsToCore.Binds.dsAbsBinds.

I also discovered that the GHC.Core.Opt.Pipeline.shortOutIndirections
was not doing a good job for

    {-# INLINE lcl_id #-}
    lcl_id = BIG

    gbl_id = lcl_id

Here we want to transfer the stable unfolding to gbl_id (we do), but
we also want to remove it from lcl_id (we were not doing that).
Otherwise both Ids have large stable unfoldings.  Easily fixed.
Note [Transferring IdInfo] explains.
25 jobs for master in 1 minute and 32 seconds (queued for 3 seconds)
latest
Status Job ID Name Coverage
  Tool Lint
failed #705952
lint
lint-linters

00:00:15

failed #705955
lint allowed to fail
lint-submods

00:00:15

failed #705956
lint
lint-submods-branch

00:00:15

failed #705953
lint
lint-testsuite

00:00:15

failed #705954
lint
typecheck-testsuite

00:00:15

 
  Quick Build
skipped #705958
x86_64-linux
hadrian-ghc-in-ghci
failed #705959
lint
lint-libs

00:00:15

skipped #705957
x86_64-linux
stack-hadrian-build
 
  Full Build
skipped #705963
aarch64-darwin-m1 allowed to fail
validate-aarch64-darwin
skipped #705964
aarch64-linux allowed to fail
validate-aarch64-linux-deb10
skipped #705965
aarch64-linux allowed to fail
validate-aarch64-linux-deb10-llvm
skipped #705966
x86_64-linux
validate-i386-linux-deb9
skipped #705962
x86_64-darwin-m1 allowed to fail
validate-x86_64-darwin
skipped #705967
x86_64-linux
validate-x86_64-linux-deb9-debug
skipped #705970
x86_64-linux
validate-x86_64-linux-deb9-dwarf
skipped #705960
x86_64-linux
validate-x86_64-linux-deb9-hadrian
skipped #705968
x86_64-linux
validate-x86_64-linux-deb9-integer-simple
skipped #705969
x86_64-linux allowed to fail manual
validate-x86_64-linux-deb9-tsan
skipped #705961
x86_64-linux
validate-x86_64-linux-deb9-unreg-hadrian
skipped #705971
x86_64-linux
validate-x86_64-linux-fedora27
skipped #705972
new-x86_64-windows test
validate-x86_64-windows-hadrian
 
  Packaging
skipped #705973
x86_64-linux
doc-tarball
 
  Testing
skipped hackage
skipped #705976
x86_64-linux-perf
perf
skipped #705975
x86_64-linux allowed to fail
perf-nofib
 
Name Stage Failure
failed
typecheck-testsuite Tool Lint There has been a runner system failure, please try again
ERROR: Preparation failed: failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
Will be retried in 3s ...
Using Docker executor with image registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d ...
Authenticating with credentials from /root/.docker/config.json
Pulling docker image registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d ...
WARNING: Failed to pull image with policy "always": Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
ERROR: Preparation failed: failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
Will be retried in 3s ...
ERROR: Job failed (system failure): failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
failed
lint-linters Tool Lint There has been a runner system failure, please try again
ERROR: Preparation failed: failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
Will be retried in 3s ...
Using Docker executor with image registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d ...
Authenticating with credentials from /root/.docker/config.json
Pulling docker image registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d ...
WARNING: Failed to pull image with policy "always": Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
ERROR: Preparation failed: failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
Will be retried in 3s ...
ERROR: Job failed (system failure): failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
failed
lint-submods-branch Tool Lint There has been a runner system failure, please try again
ERROR: Preparation failed: failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
Will be retried in 3s ...
Using Docker executor with image registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d ...
Authenticating with credentials from /root/.docker/config.json
Pulling docker image registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d ...
WARNING: Failed to pull image with policy "always": Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
ERROR: Preparation failed: failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
Will be retried in 3s ...
ERROR: Job failed (system failure): failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
failed
lint-libs Quick Build There has been a runner system failure, please try again
ERROR: Preparation failed: failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
Will be retried in 3s ...
Using Docker executor with image registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:a59df0ab737f11ea39d660345648517fa9b0d09d ...
Authenticating with credentials from /root/.docker/config.json
Pulling docker image registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:a59df0ab737f11ea39d660345648517fa9b0d09d ...
WARNING: Failed to pull image with policy "always": Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
ERROR: Preparation failed: failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
Will be retried in 3s ...
ERROR: Job failed (system failure): failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
failed
lint-testsuite Tool Lint There has been a runner system failure, please try again
ERROR: Preparation failed: failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
Will be retried in 3s ...
Using Docker executor with image registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:a59df0ab737f11ea39d660345648517fa9b0d09d ...
Authenticating with credentials from /root/.docker/config.json
Pulling docker image registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:a59df0ab737f11ea39d660345648517fa9b0d09d ...
WARNING: Failed to pull image with policy "always": Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
ERROR: Preparation failed: failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
Will be retried in 3s ...
ERROR: Job failed (system failure): failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
failed
lint-submods Tool Lint There has been a runner system failure, please try again
ERROR: Preparation failed: failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
Will be retried in 3s ...
Using Docker executor with image registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d ...
Authenticating with credentials from /root/.docker/config.json
Pulling docker image registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d ...
WARNING: Failed to pull image with policy "always": Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
ERROR: Preparation failed: failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)
Will be retried in 3s ...
ERROR: Job failed (system failure): failed to pull image "registry.gitlab.haskell.org/ghc/ci-images/linters:a59df0ab737f11ea39d660345648517fa9b0d09d" with specified policies [always]: Error response from daemon: received unexpected HTTP status: 502 Bad Gateway (manager.go:205:0s)