[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 15 commits: Detect family instance orphans correctly

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Jan 27 19:44:53 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
fdc532d4 by Simon Peyton Jones at 2023-01-27T14:44:42-05:00
Detect family instance orphans correctly

We were treating a type-family instance as a non-orphan if there
was a type constructor on its /right-hand side/ that was local. Boo!
Utterly wrong. With this patch, we correctly check the /left-hand side/
instead!

Fixes #22717

- - - - -
216988fd by Simon Peyton Jones at 2023-01-27T14:44:42-05:00
Report family instance orphans correctly

This fixes the fact that we were not reporting orphan family instances
at all. The fix here is easy, but touches a bit of code. I refactored
the code to be much more similar to the way that class instances are done:

   - Add a fi_orphan field to FamInst, like the is_orphan field in ClsInst
   - Make newFamInst initialise this field, just like newClsInst
   - And make newFamInst report a warning for an orphan, just like newClsInst
   - I moved newFamInst from GHC.Tc.Instance.Family to GHC.Tc.Utils.Instantiate,
     just like newClsInst.
   - I added mkLocalFamInst to FamInstEnv, just like mkLocalClsInst in InstEnv
   - TcRnOrphanInstance and SuggestFixOrphanInstance are now parametrised
     over class instances vs type/data family instances.

Fixes #19773

- - - - -
bc7472e6 by Simon Peyton Jones at 2023-01-27T14:44:42-05:00
Avoid orphans in STG

This patch removes some orphan instances in the STG namespace
by introducing the GHC.Stg.Lift.Types module, which allows various
type family instances to be moved to GHC.Stg.Syntax, avoiding orphan
instances.

- - - - -
bbf0f0d8 by Simon Peyton Jones at 2023-01-27T14:44:42-05:00
Avoid orphans in the parser

This moves Anno instances for PatBuilder from GHC.Parser.PostProcess
to GHC.Parser.Types to avoid orphans.

- - - - -
5e4b3576 by Simon Peyton Jones at 2023-01-27T14:44:42-05:00
Accept an orphan declaration (sadly)

This accepts the orphan type family instance

  type instance DsForeignHook = ...

in GHC.HsToCore.Types.

See Note [The Decoupling Abstract Data Hack] in GHC.Driver.Hooks

- - - - -
fea6d745 by Zubin Duggal at 2023-01-27T14:44:43-05:00
bindist configure: Fail if find not found (#22691)

- - - - -
02b08c06 by John Ericson at 2023-01-27T14:44:44-05:00
Put hadrian bootstrap plans through `jq`

This makes it possible to review changes with conventional diffing
tools.

- - - - -
d639c56b by Ben Gamari at 2023-01-27T14:44:44-05:00
testsuite: Introduce threaded2_sanity way

Incredibly, we previously did not have a single way which would test the
threaded RTS with multiple capabilities and the sanity-checker enabled.

- - - - -
bc589bde by Ben Gamari at 2023-01-27T14:44:44-05:00
rts: Relax Messages assertion

`doneWithMsgThrowTo` was previously too strict in asserting that the
`Message` is locked. Specifically, it failed to consider that the
`Message` may not be locked if we are deleting all threads during RTS
shutdown.

- - - - -
68239795 by Ben Gamari at 2023-01-27T14:44:44-05:00
testsuite: Fix race in UnliftedTVar2

Previously UnliftedTVar2 would fail when run with multiple capabilities
(and possibly even with one capability) as it would assume that
`killThread#` would immediately kill the "increment" thread.

Also, refactor the the executable to now succeed with no output and
fails with an exit code.

- - - - -
d829a005 by Ben Gamari at 2023-01-27T14:44:44-05:00
testsuite: Make listThreads more robust

Previously it was sensitive to the labels of threads which it did not
create (e.g. the IO manager event loop threads). Fix this.

- - - - -
b76a52fb by Ben Gamari at 2023-01-27T14:44:44-05:00
rts: Fix non-atomic mutation of enabled_capabilities

- - - - -
1908acc3 by Ben Gamari at 2023-01-27T14:44:44-05:00
rts: Fix C++ compilation issues

Make the RTS compilable with a C++ compiler by inserting necessary
casts.

- - - - -
f78302c2 by Ben Gamari at 2023-01-27T14:44:44-05:00
rts: Fix typo

"tracingAddCapabilities" was mis-named

- - - - -
05354a8b by Ben Gamari at 2023-01-27T14:44:44-05:00
rts: Drop long-dead fallback definitions for INFINITY & NAN

These are no longer necessary since we now compile as C99.

- - - - -


30 changed files:

- compiler/GHC.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/InstEnv.hs
- compiler/GHC/Driver/Hooks.hs
- compiler/GHC/HsToCore/Types.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Parser/Types.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Stg/InferTags/TagSig.hs
- compiler/GHC/Stg/InferTags/Types.hs
- compiler/GHC/Stg/Lift/Analysis.hs
- + compiler/GHC/Stg/Lift/Types.hs
- compiler/GHC/Stg/Pipeline.hs
- compiler/GHC/Stg/Syntax.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Deriv/Generics.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Instance/Family.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/TyCl/Class.hs
- compiler/GHC/Tc/Utils/Instantiate.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Types/Hint.hs
- compiler/GHC/Types/Hint/Ppr.hs
- compiler/ghc.cabal.in


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e30408fbc2fee7866d3b360b2ea6a455c25292c1...05354a8b42bb155499cf6e676040908ceeb43097

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e30408fbc2fee7866d3b360b2ea6a455c25292c1...05354a8b42bb155499cf6e676040908ceeb43097
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230127/848b709f/attachment.html>


More information about the ghc-commits mailing list