Commits on Source (10)
-
Works around #17190, possible resolution for #17224. New design is is according to accepted [GHC Propoal 320]. Instances in signatures currently unconditionally opt into associated family defaults if no explicit instance is given. This is bad for two reasons: 1. It constrains possible instantiations to use the default, rather than possibly define the associated family differently. 2. It breaks compilation as type families are unsupported in signatures. This PR simply turns off the filling in of defaults in those cases. Additionally, it squelches a missing definition warning for hs-boot too that was only squelched for hsig before. The downsides are: 1. There is no way to opt into the default, other than copying its definition. 2. If we fixed type classes in signatures, and wanted instances to have to explicitly *out of* rather than into the default, that would now be a breaking change. The change that is most unambiguously goood is harmonizing the warning squelching between hs-boot or hsig. Maybe they should have the warning (opt out of default) maybe they shouldn't (opt in to default), but surely it should be the same for both. Add hs-boot version of a backpack test regarding class-specified defaults in instances that appear in an hs-boot file. The metrics increase is very slight and makes no sense --- at least no one has figured anything out after this languishing for a while, so I'm just going to accept it. Metric Increase: T10421a [GHC proposal 320]: https://github.com/ghc-proposals/ghc-proposals/pull/320
59d7c9f4 -
Arity analysis used to propagate optimistic arity types during fixed-point interation through the `ArityEnv`'s `ae_cheap_fun` field, which is like `GHC.Core.Utils.exprIsCheap`, but also considers the current iteration's optimistic arity, for the binder in question only. In #18793, we have seen that this is a problematic design, because it doesn't allow us to look through PAP bindings of that binder. Hence this patch refactors to a more traditional form with an explicit signature environment, in which we record the optimistic `ArityType` of the binder in question (and at the moment is the *only* binder that is recorded in the arity environment).
7eb46a09 -
In #18793, we saw a compelling example which requires us to look at non-recursive let-bindings during arity analysis and unleash their arity types at use sites. After the refactoring in the previous patch, the needed change is quite simple and very local to `arityType`'s defn for non-recurisve `Let`. Apart from that, we had to get rid of the second item of `Note [Dealing with bottoms]`, which was entirely a safety measure and hindered optimistic fixed-point iteration. Fixes #18793. The following metric increases are all caused by this commit and a result of the fact that we just do more work now: Metric Increase: T3294 T12545 T12707
6b3eb06a -
We didn't seem to test these old tests at all, judging from their expected output.
451455fd -
This diff makes sure that incall threads, when using `rts_setInCallCapability`, will be created as locked. If the thread is not locked, the thread might end up being scheduled to a different capability. While this is mentioned in the docs for `rts_setInCallCapability,`, it makes the method significantly less useful as there is no guarantees on the capability being used. This commit also adds a test to make sure things stay on the correct capability.
50e9df49 -
0b995759
-
To correctly perform a linking hack for Windows we need to link with the RTS GHC is currently using. We used to query the RTS ways via the "settings" file but it is fragile (#18651). The hack hasn't been fixed to take into account all the ways (Tracing) and it makes linking of GHC with another RTS more difficult (we need to link with another RTS and to regenerate the settings file). So this patch uses the ways reported by the RTS itself (GHC.Platform.Ways.hostWays) instead of the "settings" file.
a91dcb66 -
* Bring back LANGUAGE pragmas in GHC.IO.Handle.Lock.Windows * Exclude some modules that are wrongfully reported
d858a3ae -
Alan Zimmerman authored
The linear arrow can be parsed as `%1 ->` or a direct single token unicode equivalent. Make sure that this distinction is captured in the parsed AST by using IsUnicodeSyntax where it appears, and introduce a new API Annotation, AnnMult to represent its location when unicode is not used. Updated haddock submodule
73b54b85 -
These issues were fixed by earlier parser changes, most likely related to whitespace-sensitive parsing.
bb5f801d
Showing
- compiler/GHC/Core/Opt/Arity.hs 162 additions, 89 deletionscompiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Driver/Session.hs 0 additions, 2 deletionscompiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Type.hs 22 additions, 21 deletionscompiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs 3 additions, 2 deletionscompiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Foreign/Decl.hs 4 additions, 4 deletionscompiler/GHC/HsToCore/Foreign/Decl.hs
- compiler/GHC/Parser.y 12 additions, 9 deletionscompiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs 1 addition, 0 deletionscompiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/PostProcess.hs 3 additions, 3 deletionscompiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Parser/PostProcess/Haddock.hs 2 additions, 2 deletionscompiler/GHC/Parser/PostProcess/Haddock.hs
- compiler/GHC/Platform.hs 0 additions, 2 deletionscompiler/GHC/Platform.hs
- compiler/GHC/Rename/HsType.hs 7 additions, 7 deletionscompiler/GHC/Rename/HsType.hs
- compiler/GHC/Settings.hs 0 additions, 6 deletionscompiler/GHC/Settings.hs
- compiler/GHC/Settings/IO.hs 0 additions, 4 deletionscompiler/GHC/Settings/IO.hs
- compiler/GHC/SysTools.hs 5 additions, 9 deletionscompiler/GHC/SysTools.hs
- compiler/GHC/Tc/Gen/HsType.hs 2 additions, 1 deletioncompiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Module.hs 1 addition, 1 deletioncompiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/TyCl.hs 1 addition, 1 deletioncompiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Class.hs 4 additions, 2 deletionscompiler/GHC/Tc/TyCl/Class.hs
- compiler/GHC/Tc/TyCl/Instance.hs 12 additions, 3 deletionscompiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/ThToHs.hs 5 additions, 4 deletionscompiler/GHC/ThToHs.hs