summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gitlab/ci: Fix name of bootstrap compiler directorywip/ghc-9.4-fwd-portsBen Gamari2022-05-041-2/+2
| | | | | | | | Windows binary distributions built with Hadrian have a target platform suffix in the name of their root directory. Teach `ci.sh` about this fact. (cherry picked from commit df5752f39671f6d04d8cd743003469ae5eb67235)
* gitlab-ci: Don't run make job in release pipelinesBen Gamari2022-05-041-1/+1
| | | | (cherry picked from commit 16d6a8ff011f2194485387dcca1c00f8ddcdbdeb)
* configure: Make sphinx version check more robustBen Gamari2022-05-041-1/+1
| | | | | | | It appears that the version of sphinx shipped on CentOS 7 reports a version string of `Sphinx v1...`. Accept the `v`. (cherry picked from commit a9197a292fd4b13308dc6664c01351c7239357ed)
* gitlab-ci: Always preserve artifacts, even in failed jobsBen Gamari2022-05-042-72/+145
| | | | (cherry picked from commit fd08b0c91ea3cab39184f1b1b1aafcd63ce6973f)
* gitlab-ci: Use ld.lld on ARMv7/LinuxBen Gamari2022-05-042-8/+14
| | | | | | | | Due to #16177. Also cleanup some code style issues. (cherry picked from commit cc1c3861e2372f464bf9e3c9c4d4bd83f275a1a6)
* testsuite/T7275: Use sed -rBen Gamari2022-05-041-1/+1
| | | | | | Darwin requires the `-r` flag to be compatible with GNU sed. (cherry picked from commit 512338c8feec96c38ef0cf799f3a01b77c967c56)
* Update supported LLVM versionsBen Gamari2022-05-042-1/+7
| | | | | | Pull forward minimum version to match 9.2. (cherry picked from commit c26faa54c5fbe902ccb74e79d87e3fa705e270d1)
* Fix several note referencesKrzysztof Gogolewski2022-05-0225-84/+40
|
* Remove obsolete code in CoreToStgKrzysztof Gogolewski2022-05-022-11/+0
| | | | | Note [Nullary unboxed tuple] was removed in e9e61f18a548b70693f4. This codepath is tested by T15696_3.
* libraries/base: docs: Explain relationshipt between `finalizeForeignPtr` and ↵Niklas Hambüchen2022-05-022-10/+22
| | | | | | `*Conc*` creation Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/21420
* typosEric Lindblad2022-05-011-2/+2
|
* exprIsDeadEnd: Use isDeadEndAppSig to check if a function appliction is ↵Andreas Klebinger2022-05-013-7/+7
| | | | | | | | | | | | bottoming. We used to check the divergence and that the number of arguments > arity. But arity zero represents unknown arity so this was subtly broken for a long time! We would check if the saturated function diverges, and if we applied >=arity arguments. But for unknown arity functions any number of arguments is >=idArity. This fixes #21440.
* Add documentation to the ByteArray# primetype.Hécate Moonlight2022-05-011-5/+44
| | | | close #21417
* StgLint: Check that functions are applied to compatible runtime repsAndreas Klebinger2022-05-014-24/+179
| | | | | We use compatibleRep to compare reps, and avoid checking functions with levity polymorphic types because of #21399.
* Testsuite driver: don't crash on empty metricssheaf2022-04-301-3/+7
| | | | | | The testsuite driver crashed when trying to display minimum/maximum performance changes when there are no metrics (i.e. there is no baseline available). This patch fixes that.
* rts/m32: Fix assertion failureBen Gamari2022-04-301-0/+3
| | | | | | | | | | This fixes an assertion failure in the m32 allocator due to the imprecisely specified preconditions of `m32_allocator_push_filled_list`. Specifically, the caller must ensure that the page type is set to filled prior to calling `m32_allocator_push_filled_list`. While this issue did result in an assertion failure in the debug RTS, the issue is in fact benign.
* Hadrian: Update README about the flavour/testsuite contractMatthew Pickering2022-04-302-0/+10
| | | | | | | | | There have been a number of tickets about non-tested flavours not passing the testsuite.. this is expected and now noted in the documentation. You use other flavours to run the testsuite at your own risk. Fixes #21418
* Add test for T21229Matthew Pickering2022-04-303-0/+26
|
* Revert "Make the specialiser handle polymorphic specialisation"Matthew Pickering2022-04-304-238/+52
| | | | | | | | | | | | | This reverts commit ef0135934fe32da5b5bb730dbce74262e23e72e8. See ticket #21229 ------------------------- Metric Decrease: T15164 Metric Increase: T13056 -------------------------
* hacking guide: mention the core libraries committeeChris Martin2022-04-301-0/+1
|
* users guide: add categories to some flagsAdam Sandberg Ericsson2022-04-301-6/+6
|
* ghc-boot: export typesynonyms from GHC.Utils.EncodingAdam Sandberg Ericsson2022-04-301-0/+2
| | | | This makes the Haddocks easier to understand.
* Update user guide example rewrite rules formattingMarius Ghita2022-04-301-3/+3
| | | | | | | | | | | | | | Change the rewrite rule examples to include a space between the composition of `f` and `g` in the map rewrite rule examples. Without this change, if the user has locally enabled the extension OverloadedRecordDot the copied example will result in a compile time error that `g` is not a field of `f`. ``` • Could not deduce (GHC.Records.HasField "g" (a -> b) (a1 -> b)) arising from selecting the field ‘g’ ```
* Convert More Diagnostics (#20116)Ben Gamari2022-04-3017-189/+505
| | | | | Replaces uses of `TcRnUnknownMessage` with proper diagnostics constructors.
* Make mkFunCo take AnonArgFlags into accountRyan Scott2022-04-304-2/+19
| | | | | | | | | | | | | | | | | | | | | | Previously, whenever `mkFunCo` would produce reflexive coercions, it would use `mkVisFunTy` to produce the kind of the coercion. However, `mkFunCo` is also used to produce coercions between types of the form `ty1 => ty2` in certain places. This has the unfortunate side effect of causing the type of the coercion to appear as `ty1 -> ty2` in certain error messages, as spotted in #21328. This patch address this by changing replacing the use of `mkVisFunTy` with `mkFunctionType` in `mkFunCo`. `mkFunctionType` checks the kind of `ty1` and makes the function arrow `=>` instead of `->` if `ty1` has kind `Constraint`, so this should always produce the correct `AnonArgFlag`. As a result, this patch fixes part (2) of #21328. This is not the only possible way to fix #21328, as the discussion on that issue lists some possible alternatives. Ultimately, it was concluded that the alternatives would be difficult to maintain, and since we already use `mkFunctionType` in `coercionLKind` and `coercionRKind`, using `mkFunctionType` in `mkFunCo` is consistent with this choice. Moreover, using `mkFunctionType` does not regress the performance of any test case we have in GHC's test suite.
* Add a note about instance visibility across component boundariesparsonsmatt2022-04-301-3/+16
| | | | | | | | | | | | | | | | | | | In principle, the *visible* instances are * all instances defined in a prior top-level declaration group (see docs on `newDeclarationGroup`), or * all instances defined in any module transitively imported by the module being compiled However, actually searching all modules transitively below the one being compiled is unreasonably expensive, so `reifyInstances` will report only the instance for modules that GHC has had some cause to visit during this compilation. This is a shortcoming: `reifyInstances` might fail to report instances for a type that is otherwise unusued, or instances defined in a different component. You can work around this shortcoming by explicitly importing the modules whose instances you want to be visible. GHC issue #20529 has some discussion around this. Fixes #20529
* rts: Refactor handling of dead threads' stacksBen Gamari2022-04-296-14/+36
| | | | | | | | | | | | | | | | This fixes a bug that @JunmingZhao42 and I noticed while working on her MMTK port. Specifically, in stg_stop_thread we used stg_enter_info as a sentinel at the tail of a stack after a thread has completed. However, stg_enter_info expects to have a two-field payload, which we do not push. Consequently, if the GC ends up somehow the stack it will attempt to interpret data past the end of the stack as the frame's fields, resulting in unsound behavior. To fix this I eliminate this hacky use of `stg_stop_thread` and instead introduce a new stack frame type, `stg_dead_thread_info`. Not only does this eliminate the potential for the previously mentioned memory unsoundness but it also more clearly captures the intended structure of the dead threads' stacks.
* testsuite: Deduplicate ways correctlywip/deduplicate-waysMatthew Pickering2022-04-291-1/+2
| | | | | | This was leading to a bug where we would run a profasm test twice which led to invalid junit.xml which meant the test results database was not being populated for the fedora33-perf job.
* testsuite: Normalise package versions in UnusedPackages testMatthew Pickering2022-04-291-1/+4
|
* Bump bytestring submoduleBen Gamari2022-04-291-0/+0
| | | | Update to current `master`.
* Provide efficient unionMG function for combining two module graphs.Matthew Pickering2022-04-291-4/+25
| | | | | | This function is used by API clients (hls). This supercedes !6922
* Revert "rts: Refactor handling of dead threads' stacks"Matthew Pickering2022-04-286-30/+9
| | | | This reverts commit e09afbf2a998beea7783e3de5dce5dd3c6ff23db.
* Remove unused lineTamar Christina2022-04-281-1/+0
|
* winio: add support to iserv.Tamar Christina2022-04-285-11/+84
|
* add since annotation for GHC.Stack.CCS.whereFromTeo Camarasu2022-04-281-0/+2
|
* configure: Bump GHC version to 9.5Ben Gamari2022-04-282-1/+1
| | | | Bumps haddock submodule.
* Add INLINE pragmas for Enum helper methodsSimon Peyton Jones2022-04-283-16/+122
| | | | | | | | | | | | | | | | | | | | | | | As #21343 showed, we need to be super-certain that the "helper methods" for Enum instances are actually inlined or specialised. I also tripped over this when I discovered that numericEnumFromTo and friends had no pragmas at all, so their performance was very fragile. If they weren't inlined, all bets were off. So I've added INLINE pragmas for them too. See new Note [Inline Enum method helpers] in GHC.Enum. I also expanded Note [Checking for INLINE loop breakers] in GHC.Core.Lint to explain why an INLINE function might temporarily be a loop breaker -- this was the initial bug report in #21343. Strangely we get a 16% runtime allocation decrease in perf/should_run/T15185, but only on i386. Since it moves in the right direction I'm disinclined to investigate, so I'll accept it. Metric Decrease: T15185
* Fix unification of ConcreteTvs, removing IsRefl#sheaf2022-04-2887-1206/+1847
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the unification of concrete type variables. The subtlety was that unifying concrete metavariables is more subtle than other metavariables, as decomposition is possible. See the Note [Unifying concrete metavariables], which explains how we unify a concrete type variable with a type 'ty' by concretising 'ty', using the function 'GHC.Tc.Utils.Concrete.concretise'. This can be used to perform an eager syntactic check for concreteness, allowing us to remove the IsRefl# special predicate. Instead of emitting two constraints `rr ~# concrete_tv` and `IsRefl# rr concrete_tv`, we instead concretise 'rr'. If this succeeds we can fill 'concrete_tv', and otherwise we directly emit an error message to the typechecker environment instead of deferring. We still need the error message to be passed on (instead of directly thrown), as we might benefit from further unification in which case we will need to zonk the stored types. To achieve this, we change the 'wc_holes' field of 'WantedConstraints' to 'wc_errors', which stores general delayed errors. For the moement, a delayed error is either a hole, or a syntactic equality error. hasFixedRuntimeRep_MustBeRefl is now hasFixedRuntimeRep_syntactic, and hasFixedRuntimeRep has been refactored to directly return the most useful coercion for PHASE 2 of FixedRuntimeRep. This patch also adds a field ir_frr to the InferResult datatype, holding a value of type Maybe FRROrigin. When this value is not Nothing, this means that we must fill the ir_ref field with a type which has a fixed RuntimeRep. When it comes time to fill such an ExpType, we ensure that the type has a fixed RuntimeRep by performing a representation-polymorphism check with the given FRROrigin This is similar to what we already do to ensure we fill an Infer ExpType with a type of the correct TcLevel. This allows us to properly perform representation-polymorphism checks on 'Infer' 'ExpTypes'. The fillInferResult function had to be moved to GHC.Tc.Utils.Unify to avoid a cyclic import now that it calls hasFixedRuntimeRep. This patch also changes the code in matchExpectedFunTys to make use of the coercions, which is now possible thanks to the previous change. This implements PHASE 2 of FixedRuntimeRep in some situations. For example, the test cases T13105 and T17536b are now both accepted. Fixes #21239 and #21325 ------------------------- Metric Decrease: T18223 T5631 -------------------------
* Bump process submoduleBen Gamari2022-04-282-1/+1
|
* hadrian: Clean up flavour transformer definitionsBen Gamari2022-04-281-4/+3
| | | | | Previously the `ipe` and `omit_pragmas` transformers were hackily defined using the textual key-value syntax. Fix this.
* testsuite: Fix calculation about whether to pass -dynamic to compilerMatthew Pickering2022-04-282-7/+7
|
* hadrian: Don't pass -rtsopts when building librariesDouglas Wilson2022-04-281-2/+2
|
* hadrian: add debug_ghc and debug_stage1_ghc flavour transformersDouglas Wilson2022-04-284-2/+20
|
* hadrian: Enrich flavours to build profiled/debugged/threaded ghcs per stageDouglas Wilson2022-04-2811-32/+30
|
* hadrian: Add Monoid instance to WayDouglas Wilson2022-04-281-1/+4
|
* testsuite: Add performance test for #14766wip/T14766-testBen Gamari2022-04-282-0/+31
| | | | This distills the essence of the Sigs.hs program found in the ticket.
* Mark GHC.Prim.PtrEq as Unsafesheaf2022-04-274-1/+14
| | | | | | | This module exports unsafe pointer equality operations, so we accordingly mark it as Unsafe. Fixes #21433
* Give Cmm files fake ModuleNames which include full filepathMatthew Pickering2022-04-278-4/+47
| | | | | | | This fixes the initialisation functions when using -prof or -finfo-table-map. Fixes #21370
* rts: add some more documentation to StgWeak closure typeAdam Sandberg Ericsson2022-04-271-2/+13
|
* Update docs for change to type-checking pluginssheaf2022-04-272-2/+13
| | | | | | There was no mention of the changes to type-checking plugins in the 9.4.1 notes, and the extending_ghc documentation contained a reference to an outdated type.