summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* hadrian: relax Cabal upper bound to allow building with Cabal-3.8Cheng Shao2022-09-161-1/+1
| | | | A follow up of !8910.
* Avoid partial head and tail in ghc-heap; replace with total pattern-matchingBodigrim2022-09-162-104/+83
|
* Update to Unicode 15.0Pierre Le Marre2022-09-1611-79/+80
|
* configure: remove unused program checksCheng Shao2022-09-161-5/+0
|
* hadrian: add late_ccs flavour transformerCheng Shao2022-09-161-0/+1
|
* hadrian: enable -fprof-late only for profiling waysCheng Shao2022-09-161-1/+1
|
* Stg.InferTags.Rewrite - Avoid some thunks.wip/andreask/infer_exprsAndreas Klebinger2022-09-151-9/+9
|
* Tag inference: Fix #21954 by retaining tagsigs of vars in function position.Andreas Klebinger2022-09-154-33/+201
| | | | | | | | | | For an expression like: case x of y Con z -> z If we also retain the tag sig for z we can generate code to immediately return it rather than calling out to stg_ap_0_fast.
* Fix typosKrzysztof Gogolewski2022-09-1464-84/+86
|
* Unbreak Hadrian with Cabal 3.8.M Farkas-Dyck2022-09-141-0/+4
|
* libraries: template-haskell: vendor filepath differentlyDouglas Wilson2022-09-145-1/+2249
| | | | | | Vendoring with ../ in hs-source-dirs prevents upload to hackage. (cherry picked from commit 1446be7586ba70f9136496f9b67f792955447842)
* Repair c++ probing on OpenBSDGreg Steuck2022-09-141-0/+1
| | | | | | | | | | Failure without this change: ``` checking C++ standard library flavour... libc++ checking for linkage against 'c++ c++abi'... failed checking for linkage against 'c++ cxxrt'... failed configure: error: Failed to find C++ standard library ```
* hadrian: Add extra implicit dependencies from DeriveLiftMatthew Pickering2022-09-142-2/+30
| | | | | | | ghc -M should know that modules which use DeriveLift (or TemplateHaskellQuotes) need TH.Lib.Internal but until it does, we have to add these extra edges manually or the modules will be compiled before TH.Lib.Internal is compiled which leads to a desugarer error.
* Remove stage1:exe:ghc-bin pre-build from CI scriptMatthew Pickering2022-09-141-4/+0
| | | | | | | | | | CI builds stage1:exe:ghc-bin before the binary-dist target which introduces some quite bad linearisation (see #22093) because we don't build stage1 compiler in parallel with anything. Then when the binary-dist target is started we have to build stage1:exe:ghc-pkg before doing anything. Fixes #22094
* hadrian: Need builders needed by Cabal Configure in parallelMatthew Pickering2022-09-144-29/+31
| | | | | | | | | | | | | Because of the use of withStaged (which needs the necessary builder) when configuring a package, the builds of stage1:exe:ghc-bin and stage1:exe:ghc-pkg where being linearised when building a specific target like `binary-dist-dir`. Thankfully the fix is quite local, to supply all the `withStaged` arguments together so the needs can be batched together and hence performed in parallel. Fixes #22093
* hadrian: Add some more packages to multi-cradleMatthew Pickering2022-09-142-11/+12
| | | | | | The main improvement here is to pass `-this-unit-id` for executables so that they can be added to the multi-cradle if desired as well as normal library packages.
* hadrian: Inplace/Final package databasesMatthew Pickering2022-09-1428-153/+318
| | | | | | | | | | | | | | | | | | | | | There are now two different package databases per stage. An inplace package database contains .conf files which point directly into the build directories. The final package database contains .conf files which point into the installed locations. The inplace .conf files are created before any building happens and have fake ABI hash values. The final .conf files are created after a package finished building and contains the proper ABI has. The motivation for this is to make the dependency structure more fine-grained when building modules. Now a module depends just depends directly on M.o from package p rather than the .conf file depend on the .conf file for package p. So when all of a modules direct dependencies have finished building we can start building it rather than waiting for the whole package to finish. The secondary motivation is that the multi-repl doesn't need to build everything before starting the multi-repl session. We can just configure the inplace package-db and use that in order to start the repl.
* hadrian: Use a stamp file to record when a package is built in a certain wayMatthew Pickering2022-09-145-4/+92
| | | | | | | | | | | Before this patch which library ways we had built wasn't recorded directly. So you would run into issues if you build the .conf file with some library ways before switching the library ways which you wanted to build. Now there is one stamp file for each way, so in order to build a specific way you can need that specific stamp file rather than going indirectly via the .conf file.
* hadrian: Bump index stateMatthew Pickering2022-09-141-1/+1
| | | | | | | This bumps the index state so a build plan can also be found when booting with 9.4. Fixes #22165
* Fix typosEric Lindblad2022-09-14194-434/+434
| | | | | | | This fixes various typos and spelling mistakes in the compiler. Fixes #21891
* compiler: remove unused lazy state monadCheng Shao2022-09-132-79/+0
|
* ci: remove unused appveyor configCheng Shao2022-09-132-75/+0
|
* Allow imports to reference multiple fields with the same name (#21625)Adam Gundry2022-09-137-23/+54
| | | | | | | | | | | | | | If a module `M` exports two fields `f` (using DuplicateRecordFields), we can still accept import M (f) import M hiding (f) and treat `f` as referencing both of them. This was accepted in GHC 9.0, but gave rise to an ambiguity error in GHC 9.2. See #21625. This patch also documents this behaviour in the user's guide, and updates the test for #16745 which is now treated differently.
* Diagnostic codes: acccept test changessheaf2022-09-132224-4578/+4819
| | | | | | | | The testsuite output now contains diagnostic codes, so many tests need to be updated at once. We decided it was best to keep the diagnostic codes in the testsuite output, so that contributors don't inadvertently make changes to the diagnostic codes.
* Add diagnostic codessheaf2022-09-1353-944/+2031
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This MR adds diagnostic codes, assigning unique numeric codes to error and warnings, e.g. error: [GHC-53633] Pattern match is redundant This is achieved as follows: - a type family GhcDiagnosticCode that gives the diagnostic code for each diagnostic constructor, - a type family ConRecursInto that specifies whether to recur into an argument of the constructor to obtain a more fine-grained code (e.g. different error codes for different 'deriving' errors), - generics machinery to generate the value-level function assigning each diagnostic its error code; see Note [Diagnostic codes using generics] in GHC.Types.Error.Codes. The upshot is that, to add a new diagnostic code, contributors only need to modify the two type families mentioned above. All logic relating to diagnostic codes is thus contained to the GHC.Types.Error.Codes module, with no code duplication. This MR also refactors error message datatypes a bit, ensuring we can derive Generic for them, and cleans up the logic around constraint solver reports by splitting up 'TcSolverReportInfo' into separate datatypes (see #20772). Fixes #21684
* Windows: Always define _UCRT when compiling C codeRyan Scott2022-09-126-1/+47
| | | | | | | As seen in #22159, this is required to ensure correct behavior when MinGW-w64 headers are in the `C_INCLUDE_PATH`. Fixes #22159.
* ci: enable parallel compression for xzCheng Shao2022-09-121-1/+1
|
* rts: fix missing dirty_MVAR argument in stg_writeIOPortzhCheng Shao2022-09-121-1/+1
|
* Add native delimited continuations to the RTSAlexis King2022-09-1156-55/+1344
| | | | | | | | | | | | | | | | | | | | | This patch implements GHC proposal 313, "Delimited continuation primops", by adding native support for delimited continuations to the GHC RTS. All things considered, the patch is relatively small. It almost exclusively consists of changes to the RTS; the compiler itself is essentially unaffected. The primops come with fairly extensive Haddock documentation, and an overview of the implementation strategy is given in the Notes in rts/Continuation.c. This first stab at the implementation prioritizes simplicity over performance. Most notably, every continuation is always stored as a single, contiguous chunk of stack. If one of these chunks is particularly large, it can result in poor performance, as the current implementation does not attempt to cleverly squeeze a subset of the stack frames into the existing stack: it must fit all at once. If this proves to be a performance issue in practice, a cleverer strategy would be a worthwhile target for future improvements.
* CmmToC: enable 64-bit CallishMachOp on 32-bit targetsCheng Shao2022-09-081-31/+29
| | | | | | | | | Normally, the unregisterised builds avoid generating 64-bit CallishMachOp in StgToCmm, so CmmToC doesn't support these. However, there do exist cases where we'd like to invoke cmmToC for other cmm inputs which may contain such CallishMachOps, and it's a rather low effort to add support for these since they only require calling into existing ghc-prim cbits.
* Isolate some Applicative hidings to GHC.PreludeGeorgi Lyubenov2022-09-085-9/+7
| | | | | | | By reexporting the entirety of Applicative from GHC.Prelude, we can save ourselves some `hiding` and importing of `Applicative` in consumers of GHC.Prelude. This also has the benefit of isolating this type of change to GHC.Prelude, so that people in the future don't have to think about it.
* Bump submodule Cabal to one with liftA2 warnings fixedGeorgi Lyubenov2022-09-081-0/+0
|
* Bump submodule containers to one with liftA2 warnings fixedGeorgi Lyubenov2022-09-081-0/+0
|
* Add changelog entry for liftA2 export from PreludeGeorgi Lyubenov2022-09-081-0/+4
|
* Export liftA2 from PreludeGeorgi Lyubenov2022-09-0811-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: In order to be warning free and compatible, we hide Applicative(..) from Prelude in a few places and instead import it directly from Control.Applicative. Please see the migration guide at https://github.com/haskell/core-libraries-committee/blob/main/guides/export-lifta2-prelude.md for more details. This means that Applicative is now exported in its entirety from Prelude. Motivation: This change is motivated by a few things: * liftA2 is an often used function, even more so than (<*>) for some people. * When implementing Applicative, the compiler will prompt you for either an implementation of (<*>) or of liftA2, but trying to use the latter ends with an error, without further imports. This could be confusing for newbies. * For teaching, it is often times easier to introduce liftA2 first, as it is a natural generalisation of fmap. * This change seems to have been unanimously and enthusiastically accepted by the CLC members, possibly indicating a lot of love for it. * This change causes very limited breakage, see the linked issue below for an investigation on this. See https://github.com/haskell/core-libraries-committee/issues/50 for the surrounding discussion and more details.
* Remove Outputable Char instanceKrzysztof Gogolewski2022-09-0713-24/+26
| | | | | Use 'text' instead of 'ppr'. Using 'ppr' on the list "hello" rendered as "h,e,l,l,o".
* Minor SDoc cleanupKrzysztof Gogolewski2022-09-0711-28/+19
| | | | | | | Change calls to renderWithContext with showSDocOneLine; it's more efficient and explanatory. Remove polyPatSig (unused)
* CmmToAsm: remove unused ModLocation from NatM_StateCheng Shao2022-09-073-21/+10
|
* whitespaceEric Lindblad2022-09-071-1/+1
|
* typosEric Lindblad2022-09-076-13/+13
|
* typoEric Lindblad2022-09-071-1/+1
|
* ci: remove unused build_make/test_make in ci scriptCheng Shao2022-09-061-46/+0
|
* Fix :add docs in user guideJan HrĨek2022-09-061-1/+1
|
* Update instances.rst, clarifying InstanceSigssheaf2022-09-061-5/+30
| | | | Fixes #22103
* gitlab-ci: Ensure that ghc derivation is in scopeBen Gamari2022-09-051-1/+1
| | | | | | Previously the lint-ci job attempted to use cabal-install (specifically `cabal update`) without a GHC in PATH. However, cabal-install-3.8 appears to want GHC, even for `cabal update`.
* DmdAnal: Don't panic in addCaseBndrDmd (#22039)Sebastian Graf2022-09-053-18/+117
| | | | | | | | | | Rather conservatively return Top. See Note [Untyped demand on case-alternative binders]. I also factored `addCaseBndrDmd` into two separate functions `scrutSubDmd` and `fieldBndrDmds`. Fixes #22039.
* Fix bootstrap with ghc-9.0Matthew Pickering2022-09-011-0/+9
| | | | | | It turns out Solo is a very recent addition to base, so for older GHC versions we just defined it inline here the one place we use it in the compiler.
* Change Ord defaults per CLC proposalTommy Bidne2022-09-013-3/+11
| | | | Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/24#issuecomment-1233331267
* Minor cleanupKrzysztof Gogolewski2022-09-0112-40/+19
| | | | | | | | | - Remove mkHeteroCoercionType, sdocImpredicativeTypes, isStateType (unused), isCoVar_maybe (duplicated by getCoVar_maybe) - Replace a few occurrences of voidPrimId with (# #). void# is a deprecated synonym for the unboxed tuple. - Use showSDoc in :show linker. This makes it consistent with the other :show commands
* Add regression test for #21550Zubin Duggal2022-09-012-0/+40
| | | | | This was fixed by ca90ffa321a31842a32be1b5b6e26743cd677ec5 "Use local instances with least superclass depth"