summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* configure: Bump min bootstrap GHC version to 9.2wip/ghc-9.2-min-versionBryan Richter2022-12-121-1/+1
|
* Document that Bifunctor instances for tuples are lawful only up to lazinessBodigrim2022-12-111-2/+11
|
* Add heqT, a kind-heterogeneous variant of heqOleg Grenrus2022-12-112-2/+11
| | | | CLC proposal https://github.com/haskell/core-libraries-committee/issues/99
* hlint: Removed redundant UnboxedSums pragmasMatthew Pickering2022-12-093-3/+0
| | | | | | | UnboxedSums is quite confusingly implied by UnboxedTuples, alas, just the way it is. See #22485
* ci: Bump boot images to use ghc-9.4.3Matthew Pickering2022-12-091-4/+4
| | | | Also updates the bootstrap jobs to test booting 9.2 and 9.4.
* hadrian: Update bootstrap plans to 9.2.* series and 9.4.* series.Matthew Pickering2022-12-0935-31/+31
| | | | | | This updates the build plans for the most recent compiler versions, as well as fixing the hadrian-bootstrap-gen script to a specific GHC version.
* ci: Add job to test hadrian-multi commandMatthew Pickering2022-12-093-3/+55
| | | | | I am not sure this job is good because it requires booting HEAD with HEAD, but it should be fine.
* driver: Set correct UnitId when rehydrating modulesMatthew Pickering2022-12-091-2/+3
| | | | | | | | We were not setting the UnitId before rehydrating modules which just led to us attempting to find things in the wrong HPT. The test for this is the hadrian-multi command (which is now added as a CI job). Fixes #22222
* hadrian-toolargs: Add filepath to allowed repl targetsMatthew Pickering2022-12-091-0/+1
|
* hadrian-multi: Put interface files in separate directoriesMatthew Pickering2022-12-092-2/+4
| | | | | Before we were putting all the interface files in the same directory which was leading to collisions if the files were called the same thing.
* Update containers submoduleMatthew Pickering2022-12-091-0/+0
| | | | | | This contains a fix necessary for the multi-repl to work on GHC's code base where we try to load containers and template-haskell into the same session.
* Fix bound thread statusLuite Stegeman2022-12-091-1/+1
|
* Add support for environments that don't have setImmediateLuite Stegeman2022-12-091-4/+13
|
* Fix #22300 Document GHC's extensions to valid whitespaceMike Pilgrem2022-12-092-0/+30
|
* Document TH splices' interaction with INCOHERENT instancesRyan Scott2022-12-091-0/+72
| | | | | | | | | Top-level declaration splices can having surprising interactions with `INCOHERENT` instances, as observed in #22492. This patch resolves #22492 by documenting this strange interaction in the GHC User's Guide. [ci skip]
* testsuite: Mark conc024 fragile on WindowsBryan Richter2022-12-081-1/+1
|
* Fixes around primitive literalsKrzysztof Gogolewski2022-12-087-23/+37
| | | | | | | | | * The SourceText of primitive characters 'a'# did not include the #, unlike for other primitive literals 1#, 1##, 1.0#, 1.0##, "a"#. We can now remove the function pp_st_suffix, which was a hack to add the # back. * Negative primitive literals shouldn't use parentheses, as described in Note [Printing of literals in Core]. Added a testcase to T14681.
* Delete `rts/package.conf.in`John Ericson2022-12-081-331/+0
| | | | | It is a relic of the Make build system. The RTS now uses a `package.conf` file generated the usual way by Cabal.
* Do not strictify a DFun's parameter dictionaries (#22549)Sebastian Graf2022-12-085-38/+106
| | | | | | | | | ... thus fixing #22549. The details are in the refurbished and no longer dead `Note [Do not strictify a DFun's parameter dictionaries]`. There's a regression test in T22549.
* Make `drop` and `dropWhile` fuse (#18964)Sebastian Graf2022-12-084-25/+65
| | | | | | | I copied the fusion framework we have in place for `take`. T18964 asserts that we regress neither when fusion fires nor when it doesn't. Fixes #18964.
* Typeable: Fix module locations of some definitions in GHC.TypesMatthew Pickering2022-12-084-4/+70
| | | | | | | | | | | | | There was some confusion in Data.Typeable about which module certain wired-in things were defined in. Just because something is wired-in doesn't mean it comes from GHC.Prim, in particular things like LiftedRep and RuntimeRep are defined in GHC.Types and that's the end of the story. Things like Int#, Float# etc are defined in GHC.Prim as they have no Haskell definition site at all so we need to generate type representations for them (which live in GHC.Types). Fixes #22510
* Make (^) INLINE (#22324)Sebastian Graf2022-12-082-25/+58
| | | | | | | | | | | | | So that we get to cancel away the allocation for the lazily used base. We can move `powImpl` (which *is* strict in the base) to the top-level so that we don't duplicate too much code and move the SPECIALISATION pragmas onto `powImpl`. The net effect of this change is that `(^)` plays along much better with inlining thresholds and loopification (#22227), for example in `x2n1`. Fixes #22324.
* Fix testsBodigrim2022-12-087-13/+14
|
* Support mtl-2.3 in check-exactBodigrim2022-12-083-4/+7
|
* Allow mtl-2.3 in hadrianBodigrim2022-12-082-2/+2
|
* Update submodule mtl to 2.3.1, parsec to 3.1.15.1, haddock and Cabal to HEADBodigrim2022-12-083-0/+0
|
* Add initial support for LoongArch Architecture.lrzlin2022-12-0829-7/+314
|
* Fix mk_mod_usage_info if the interface file is not already loadedMatthew Pickering2022-12-088-43/+70
| | | | | | | | | | | | | | | | | | | | In #22217 it was observed that the order modules are compiled in affects the contents of an interface file. This was because a module dependended on another module indirectly, via a re-export but the interface file for this module was never loaded because the symbol was never used in the file. If we decide that we depend on a module then we jolly well ought to record this fact in the interface file! Otherwise it could lead to very subtle recompilation bugs if the dependency is not tracked and the module is updated. Therefore the best thing to do is just to make sure the file is loaded by calling the `loadSysInterface` function. This first checks the caches (like we did before) but then actually goes to find the interface on disk if it wasn't loaded. Fixes #22217
* backpack: Be more careful when adding together ImportAvailsMatthew Pickering2022-12-082-11/+22
| | | | | | | | | | | | | | There was some code in the signature merging logic which added together the ImportAvails of the signature and the signature which was merged into it. This had the side-effect of making the merged signature depend on the signature (via a normal module dependency). The intention was to propagate orphan instances through the merge but this also messed up recompilation logic because we shouldn't be attempting to load B.hi when mergeing it. The fix is to just combine the part of ImportAvails that we intended to (transitive info, orphan instances and type family instances) rather than the whole thing.
* ci: Add job for testing interface stability across buildsMatthew Pickering2022-12-082-0/+44
| | | | | | | | | | | | The idea is that both the bindists should product libraries with the same ABI and interface hash. So the job checks with ghc-pkg to make sure the computed ABI is the same. In future this job can be extended to check for the other facets of interface determinism. Fixes #22180
* ci: Add job to test interface file determinism guaranteesMatthew Pickering2022-12-082-0/+100
| | | | | | | | | | | | | | In this job we can run on every commit we add a test which builds the Cabal library twice and checks that the ABI hash and interface hash is stable across the two builds. * We run the test 20 times to try to weed out any race conditions due to `-j` * We run the builds in different temporary directories to try to weed out anything related to build directory affecting ABI or interface file hash. Fixes #22180
* Add test for #22162Matthew Pickering2022-12-084-0/+22
|
* Restore show (typeRep @[]) == "[]"Krzysztof Gogolewski2022-12-083-0/+4
| | | | | | | | | The Show instance for TypeRep [] has changed in 9.5 to output "List" because the name of the type constructor changed. This seems to be accidental and is inconsistent with TypeReps of saturated lists, which are printed as e.g. "[Int]". For now, I'm restoring the old behavior; in the future, maybe we should show TypeReps without puns (List, Tuple, Type).
* hadrian: don't add debug info to non-debug ways of rtsCheng Shao2022-12-081-1/+0
| | | | | | | | | Hadrian used to pass -g when building all ways of rts. It makes output binaries larger (especially so for wasm backend), and isn't needed by most users out there, so this patch removes that flag. In case the debug info is desired, we still pass -g3 when building the debug way, and there's also the debug_info flavour transformer which ensures -g3 is passed for all rts ways.
* Truncate eventlog event for large payload (#20221)Ian-Woo Kim2022-12-081-1/+11
| | | | | | | | | | | | | | RTS eventlog events for postCapsetVecEvent are truncated if payload is larger than EVENT_PAYLOAD_SIZE_MAX Previously, postCapsetVecEvent records eventlog event with payload of variable size larger than EVENT_PAYLOAD_SIZE_MAX (2^16) without any validation, resulting in corrupted data. For example, this happens when a Haskell binary is invoked with very long command line arguments exceeding 2^16 bytes (see #20221). Now we check the size of accumulated payload messages incrementally, and truncate the message just before the payload size exceeds EVENT_PAYLOAD_SIZE_MAX. RTS will warn the user with a message showing how many arguments are truncated.
* Mark Type.Reflection.Unsafe as UnsafeKrzysztof Gogolewski2022-12-082-1/+2
| | | | | This module can be used to construct ill-formed TypeReps, so it should be Unsafe.
* Add version of `reachableGraph` that avoids loop for cyclic inputsGergő Érdi2022-12-081-26/+77
| | | | | | by building its result connected component by component Fixes #22512
* Remove copy-pasted definitions of `graphFromEdgedVertices*`Gergő Érdi2022-12-081-2/+2
|
* Fix bounds-checking buglet in Data.Array.ByteMatthew Craven2022-12-081-3/+5
| | | | | ...another manifestation of #20851 which I unfortunately missed in my first pass.
* Push DynFlags out of Linker.MacOSmrkun2022-12-066-6/+38
|
* Push DynFlags out of runInjectRPathsmrkun2022-12-063-9/+13
|
* Push DynFlags out of askOtoolmrkun2022-12-063-8/+6
|
* Push DynFlags out of runInstallNameToolmrkun2022-12-063-7/+7
|
* Hadrian: fix ghcDebugAssertions off-by-one errorsheaf2022-12-065-21/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6b2f7ffe changed the logic that decided whether to enable debug assertions. However, it had an off-by-one error, as the stage parameter to the function inconsistently referred to the stage of the compiler being used to build or the stage of the compiler we are building. This patch makes it consistent. Now the parameter always refers to the the compiler which is being built. In particular, this patch re-enables assertions in the stage 2 compiler when building with devel2 flavour, and disables assertions in the stage 2 compiler when building with validate flavour. Some extra performance tests are now run in the "validate" jobs because the stage2 compiler no longer contains assertions. ------------------------- Metric Decrease: CoOpt_Singletons MultiComponentModules MultiComponentModulesRecomp MultiLayerModulesTH_OneShot T11374 T12227 T12234 T13253-spj T13701 T14683 T14697 T15703 T17096 T17516 T18304 T18478 T18923 T5030 T9872b TcPlugin_RewritePerf Metric Increase: MultiComponentModules MultiComponentModulesRecomp MultiLayerModules MultiLayerModulesRecomp MultiLayerModulesTH_Make T13386 T13719 T3294 T9233 T9675 parsing001 -------------------------
* Add BufSpan to EpaLocation (#22319, #22558)Vladislav Zavialov2022-12-0511-62/+67
| | | | | | | | | | | | | | | | | | The key part of this patch is the change to mkTokenLocation: - mkTokenLocation (RealSrcSpan r _) = TokenLoc (EpaSpan r) + mkTokenLocation (RealSrcSpan r mb) = TokenLoc (EpaSpan r mb) mkTokenLocation used to discard the BufSpan, but now it is saved and can be retrieved from LHsToken or LHsUniToken. This is made possible by the following change to EpaLocation: - data EpaLocation = EpaSpan !RealSrcSpan + data EpaLocation = EpaSpan !RealSrcSpan !(Strict.Maybe BufSpan) | ... The end goal is to make use of the BufSpan in Parser/PostProcess/Haddock.
* Handle type data declarations in Template Haskell quotations and splices ↵Ross Paterson2022-12-0315-55/+172
| | | | | | | (fixes #22500) This adds a TypeDataD constructor to the Template Haskell Dec type, and ensures that the constructors it contains go in the TyCls namespace.
* addHsOuterFamEqnTyVarBinds: use FreshNamesOnly for explicit bindersVladislav Zavialov2022-12-031-1/+1
| | | | | | | | | | | | | Consider this example: [d| instance forall a. C [a] where type forall b. G [a] b = Proxy b |] When we process "forall b." in the associated type instance, it is unambiguously the binding site for "b" and we want a fresh name for it. Therefore, FreshNamesOnly is more fitting than ReuseBoundNames. This should not have any observable effect but it avoids pointless lookups in the MetaEnv.
* Refactor: FreshOrReuse instead of addTyClTyVarBindsVladislav Zavialov2022-12-031-65/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a refactoring that should have no effect on observable behavior. Prior to this change, GHC.HsToCore.Quote contained a few closely related functions to process type variable bindings: addSimpleTyVarBinds, addHsTyVarBinds, addQTyVarBinds, and addTyClTyVarBinds. We can classify them by their input type and name generation strategy: Fresh names only Reuse bound names +---------------------+-------------------+ [Name] | addSimpleTyVarBinds | | [LHsTyVarBndr flag GhcRn] | addHsTyVarBinds | | LHsQTyVars GhcRn | addQTyVarBinds | addTyClTyVarBinds | +---------------------+-------------------+ Note how two functions are missing. Because of this omission, there were two places where a LHsQTyVars value was constructed just to be able to pass it to addTyClTyVarBinds: 1. mk_qtvs in addHsOuterFamEqnTyVarBinds -- bad 2. mkHsQTvs in repFamilyDecl -- bad This prevented me from making other changes to LHsQTyVars, so the main goal of this refactoring is to get rid of those workarounds. The most direct solution would be to define the missing functions. But that would lead to a certain amount of code duplication. To avoid code duplication, I factored out the name generation strategy into a function parameter: data FreshOrReuse = FreshNamesOnly | ReuseBoundNames addSimpleTyVarBinds :: FreshOrReuse -> ... addHsTyVarBinds :: FreshOrReuse -> ... addQTyVarBinds :: FreshOrReuse -> ...
* Mark T16916 fragileBryan Richter2022-12-031-1/+1
| | | | See https://gitlab.haskell.org/ghc/ghc/-/issues/16966
* Fix linearity checking in LintKrzysztof Gogolewski2022-12-023-15/+35
| | | | | | | | Lint was not able to see that x*y <= x*y, because this inequality was decomposed to x <= x*y && y <= x*y, but there was no rule to see that x <= x*y. Fixes #22546.