Commits on Source (34)
-
Simon Peyton Jones authored
This fixes #23323 See (RC4) in Note [Tracking redundant constraints]
2b0c9f5e -
567b32e1
-
This partially reverts some of the changes in !9475 to make `base` and `ghc-prim` depend on the `mingwex` library on Windows. It also restores the RTS's stubs for `mingwex`-specific symbols such as `_lock_file`. This is done because the C runtime provides `libmingwex` nowadays, and moreoever, not linking against `mingwex` requires downstream users to link against it explicitly in difficult-to-predict circumstances. Better to always link against `mingwex` and prevent users from having to do the guesswork themselves. See !10360 (comment 495873) for the discussion that led to this.
2b1a4abe -
We were checking that TH-spliced data declarations do not look like this: ```hs data D :: Type = MkD Int ``` But we were only doing so for `data` declarations' data constructors, not for `newtype`s, `data instance`s, or `newtype instance`s. This patch factors out the necessary validity checks into its own `cvtDataDefnCons` function and uses it in all of the places where it needs to be. Fixes #22559.
3ab0155b -
This fixes the behaviour of -keep-tmp-files when used in an OPTIONS_GHC pragma for files with module level scope. Instead of simple not deleting the files, we also need to remove them from the TmpFs so they are not deleted later on when all the other files are deleted. There are additional complications because you also need to remove the directory where these files live from the TmpFs so we don't try to delete those later either. I added two tests. 1. Tests simply that -keep-tmp-files works at all with a single module and --make mode. 2. The other tests that temporary files are deleted for other modules which don't enable -keep-tmp-files. Fixes #23339
a24b83dd -
Ticket #23305 reports an error where we were attempting to use the logger which was created by withDeferredDiagnostics after its scope had ended. This problem would have been caught by this patch and a validate build: ``` +*** Exception: Use after free +CallStack (from HasCallStack): + error, called at compiler/GHC/Driver/Make.hs:<line>:<column> in <package-id>:GHC.Driver.Make ``` This general issue is tracked by #20981
dcf32882 -
By returning a complete HscEnv from upsweep the logger (as introduced by withDeferredDiagnostics) was escaping the scope of withDeferredDiagnostics and hence we were losing error messages. This is reminiscent of #20981, which also talks about writing errors into messages after their scope has ended. See #23305 for details.
432c736c -
Introduce a `-ddump-spec-constr` flag which debugs specialisations from `SpecConstr`. These are no longer shown when you use `-ddump-spec`.
26013cdc -
Ticket #23454 explained it was possible to implement unsafeCoerce because SNat was lacking a role annotation. As these are supposed to be singleton types but backed by an efficient representation the correct annotation is nominal to ensure these kinds of coerces are forbidden. These annotations were missed from https://github.com/haskell/core-libraries-committee/issues/85 which was implemented in 532de368. CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/170 Fixes #23454
4639100b -
This broke the sdist generation. Fixes #23489
9c0dcff7 -
273ff0c7
-
-Wterm-variable-capture wasn't accordant with type variable scoping in associated types, in type classes. For example, this code produced the warning: k = 12 class C k a where type AT a :: k -> Type I solved this issue by reusing machinery of newTyVarNameRn function that is accordand with associated types: it does lookup for each free type variable when we are in the type class context. And in this patch I use result of this work to make sure that -Wterm-variable-capture warns only on implicitly quantified type variables.
b84a2900 -
9d1a8d87
-
Resolves #22825 Now each diagnostic can name multiple different warning flags for its reason. There is currently one use case: missing signatures. Currently we need to check which warning flags are enabled when generating the diagnostic, which is against the declarative nature of the diagnostic framework. This patch allows a warning diagnostic to have multiple warning flags, which makes setup more declarative. The WarningWithFlag pattern synonym is added for backwards compatibility The 'msgEnvReason' field is added to MsgEnvelope to store the `ResolvedDiagnosticReason`, which accounts for the enabled flags, and then that is used for pretty printing the diagnostic.
a1f350e2 -
Tracking ticket: #23059 This runs compile_and_run tests with optimised code with bytecode interpreter Changed submodules: hpc, process Co-authored-by:
Torsten Schmits <git@tryp.io>
ec01f0ec -
When GHC invokes clang, it currently passes -Qunused-arguments to discard warnings resulting from GHC using multiple options that aren't used. In this commit, we configure -Qunused-arguments into the Cc options instead of checking if the compiler is clang at runtime and hardcoding the flag into GHC. This is part of the effort to centralise toolchain information in toolchain target files at configure time with the end goal of a runtime retargetable GHC. This also means we don't need to call getCompilerInfo ever, which improves performance considerably (see !10589). Metric Decrease: PmSeriesG T10421 T11303b T12150 T12227 T12234 T12425 T13035 T13253-spj T13386 T15703 T16875 T17836b T17977 T17977b T18140 T18282 T18304 T18698a T18698b T18923 T20049 T21839c T3064 T5030 T5321FD T5321Fun T5837 T6048 T9020 T9198 T9872d T9961
c6741e72 -
between different precisions.
0128db87 -
Co-authored-by:
Tilde Rose <t1lde@protonmail.com>
ed2dbdca -
c90d96e4
-
newtype instances. Fixes #17328
de58080c -
Fixes #19692. Prototypical cases: class C1 a where x1 :: a -> Int data G1 = G1 deriving C1 class C2 a where x2 :: a -> Int x2 _ = 0 data G2 = G2 deriving C2 Both of these used to give this suggestion, but for C1 the suggestion would have failed (generated code with undefined methods, which compiles but warns). Now C2 still gives the suggestion but C1 doesn't.
5e3c2b05 -
80a0b099
-
Implements #22826 This is a restricted version of -Wmissing-kind-signatures shown only for polykinded types.
e4b33a1d -
f8395b94
-
Fixes #23486
b852a5b6 -
Remove 'recursive' in the error message, since the error can arise without recursion.
c29b45ee -
Fixes #23176
b80ef202 -
These need to be added since we started testing aarch64 on head.hackage CI. The jobs will sometimes fail because they will start before the relevant aarch64 job has finished. Fixes #23511
bd8ef37d -
CodeQ and TExpQ already had standalone kind signatures even before this change: type TExpQ :: TYPE r -> Kind.Type type CodeQ :: TYPE r -> Kind.Type Now Code and TExp have signatures too: type TExp :: TYPE r -> Kind.Type type Code :: (Kind.Type -> Kind.Type) -> TYPE r -> Kind.Type This is a stylistic change.
a0c27cee -
This patch modifies the renamer to respect ScopedTypeVariables in kind signatures. This means that kind variables bound by the outermost `forall` now scope over the type: type F = '[Right @a @() () :: forall a. Either a ()] -- ^^^^^^^^^^^^^^^ ^^^ -- in scope here bound here However, any use of such variables is a type error, because we don't have type-level lambdas to bind them in Core. This is described in the new Note [Type variable scoping errors during type check] in GHC.Tc.Types.
8e308425
Showing
- .gitlab-ci.yml 18 additions, 0 deletions.gitlab-ci.yml
- HACKING.md 4 additions, 36 deletionsHACKING.md
- compiler/GHC/Core/Type.hs 10 additions, 0 deletionscompiler/GHC/Core/Type.hs
- compiler/GHC/Data/BooleanFormula.hs 1 addition, 21 deletionscompiler/GHC/Data/BooleanFormula.hs
- compiler/GHC/Driver/Config/Core/Lint.hs 1 addition, 1 deletioncompiler/GHC/Driver/Config/Core/Lint.hs
- compiler/GHC/Driver/Errors.hs 2 additions, 1 deletioncompiler/GHC/Driver/Errors.hs
- compiler/GHC/Driver/Flags.hs 3 additions, 0 deletionscompiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Make.hs 16 additions, 15 deletionscompiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Pipeline/Execute.hs 1 addition, 21 deletionscompiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs 3 additions, 0 deletionscompiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Type.hs 8 additions, 1 deletioncompiler/GHC/Hs/Type.hs
- compiler/GHC/Iface/Decl.hs 12 additions, 1 deletioncompiler/GHC/Iface/Decl.hs
- compiler/GHC/Iface/Syntax.hs 41 additions, 5 deletionscompiler/GHC/Iface/Syntax.hs
- compiler/GHC/IfaceToCore.hs 4 additions, 2 deletionscompiler/GHC/IfaceToCore.hs
- compiler/GHC/Rename/HsType.hs 78 additions, 12 deletionscompiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Names.hs 8 additions, 9 deletionscompiler/GHC/Rename/Names.hs
- compiler/GHC/Tc/Deriv.hs 25 additions, 9 deletionscompiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Errors.hs 14 additions, 3 deletionscompiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Ppr.hs 17 additions, 19 deletionscompiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs 10 additions, 4 deletionscompiler/GHC/Tc/Errors/Types.hs