summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Make sure all platforms have a release jobwip/release-ciMatthew Pickering2022-02-101-20/+24
| | | | | | | | | The release bindists are currently a mixture of validate and release builds. This is bad because the validate builds don't have profiling libraries. The fix is to make sure there is a release job for each platform we want to produce a release for.t Fixes #21066
* Don't try to build stage1 with -eventlog if stage0 doesn't provide itPHO2022-02-088-4/+38
| | | | Like -threaded, stage0 isn't guaranteed to have an event-logging RTS.
* Document that reifyRoles includes kind parametersRichard Eisenberg2022-02-081-1/+13
| | | | Close #21056
* rts/MemoryMap: Use mach_-prefixed type namesBen Gamari2022-02-081-4/+6
| | | | | | | | | | | There appears to be some inconsistency in system-call type naming across Darwin toolchains. Specifically: * the `address` argument to `mach_vm_region` apparently wants to be a `mach_vm_address_t *`, not a `vm_address_t *` * the `vmsize` argument to `mach_vm_region` wants to be a `mach_vm_size_t`, not a `vm_size_t`
* Fix build on recent FreeBSD.Gleb Popov2022-02-081-1/+1
| | | | | Recent FreeBSD versions gained the sched_getaffinity function, which made two mutually exclusive #ifdef blocks to be enabled.
* StgToCmm: Get rid of GHC.Driver.Session importsJohn Ericson2022-02-087-38/+39
| | | | | `DynFlags` is gone, but let's move a few trivial things around to get rid of its module too.
* Document `hscIncrementalFrontend` and flip boolCale Gibbard2022-02-081-10/+21
|
* `hscSimpleIface` drop fingerprint param and retCale Gibbard2022-02-081-12/+10
| | | | | | | | | `hscSimpleIface` does not depend on or modify the `Maybe Fingerprint` it is given, only passes it through, so get rid of the extraneous passing. Perhaps the intent was that there would be an iface fingerprint check of some sort? but this was never done. If/when we we want to do that, we can add it back then.
* Add suggestion mode to notes-utilMatthew Pickering2022-02-083-4/+33
|
* Fix some notesMatthew Pickering2022-02-0854-170/+97
|
* Add notes linter to testsuiteMatthew Pickering2022-02-0814-873/+334
|
* gitlab-ci: Add lint-notes jobBen Gamari2022-02-082-2/+10
|
* notes-util: initial commitBen Gamari2022-02-086-0/+1144
|
* Remove linter dependency on lint-submodsMatthew Pickering2022-02-081-1/+1
|
* Relax TyEq:N: allow out-of-scope newtype DataConsheaf2022-02-085-8/+69
| | | | | | | | | | The 'bad_newtype' assertion in GHC.Tc.Solver.Canonical.canEqCanLHSFinish failed to account for the possibility that the newtype constructor might not be in scope, in which case we don't provide any guarantees about canonicalising away a newtype on the RHS of a representational equality. Fixes #21010
* Allow HasField in quantified constraintssheaf2022-02-083-1/+43
| | | | | | | | | | | | | | | | | | | | We perform validity checking on user-written HasField instances, for example to disallow: data Foo a = Foo { fld :: Int } instance HasField "fld" (Foo a) Bool However, these checks were also being made on quantified constraints, e.g. data Bar where Bar :: (forall a. HasField s (Foo a) Int) => Proxy s -> Bar This patch simply skips validity checking for quantified constraints, in line with what we already do for equality constraints such as Coercible. Fixes #20989
* Avoid using removed utils/checkUniques in validateGreg Steuck2022-02-071-1/+0
| | | | | Asked the question: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7460/diffs#4061f4d17546e239dd10d78c6b48668c2a288e02_1_0
* Create `CoverageConfig`John Ericson2022-02-072-7/+27
| | | | | As requested by @mpickering to collect the information we project from `HscEnv`
* GHC.HsToCore.Coverage: No more HscEnv, less DynFlagsJohn Ericson2022-02-072-33/+31
| | | | Progress towards #20730
* hadrian: remove redundant importAlex D2022-02-061-1/+0
|
* RTS: Fix cabal specificationPeter Trommler2022-02-061-4/+0
| | | | | In 35bea01b xxhash.c was removed. Remove the extra-source-files stanza referring to it.
* Purge DynFlags from GHC.StgJohn Ericson2022-02-0620-97/+218
| | | | | Also derive some more instances. GHC doesn't need them, but downstream consumers may need to e.g. put stuff in maps.
* Fix macro redefinition warnings for PRINTFBen Gamari2022-02-063-9/+12
| | | | | | * Move `PRINTF` macro from `Stats.h` to `Stats.c` as it's only needed in the latter. * Undefine `PRINTF` at the end of `Messages.h` to avoid leaking it.
* rts: Dump memory map on memory mapping failuresBen Gamari2022-02-065-0/+158
| | | | Fixes #20992.
* rts/m32: Increase size of free page pool to 256 pagesGHC GitLab CI2022-02-061-1/+1
|
* rts/m32: Free large objects back to the free page poolBen Gamari2022-02-061-3/+2
| | | | Not entirely convinced that this is worth doing.
* rts/m32: Add consistency-checking infrastructureGHC GitLab CI2022-02-061-11/+96
| | | | | | | This adds logic, enabled in the `-debug` RTS for checking the internal consistency of the m32 allocator. This area has always made me a bit nervous so this should help me sleep better at night in exchange for very little overhead.
* rts: Generalize mmapForLinkerMarkExecutableGHC GitLab CI2022-02-067-17/+61
| | | | | Renamed to mprotectForLinker and allowed setting of arbitrary protection modes.
* rts/m32: Accept any address within 4GB of program textBen Gamari2022-02-063-66/+78
| | | | | | | | | | | Previously m32 would assume that the program image was located near the start of the address space and therefore assume that it wanted pages in the bottom 4GB of address space. Instead we now check whether they are within 4GB of whereever the program is loaded. This is necessary on Windows, which now tends to place the image in high memory. The eventual goal is to use m32 to allocate memory for linker sections on Windows.
* Make implication tidying agree with Note [Tidying multiple names at once]Matthew Pickering2022-02-0535-200/+201
| | | | | | | | | | | Note [Tidying multiple names at once] indicates that if multiple variables have the same name then we shouldn't prioritise one of them and instead rename them all to a1, a2, a3... etc This patch implements that change, some error message changes as expected. Closes #20932
* Exit with failure when -e fails (fixes #18411 #9916 #17560)nineonine2022-02-0533-70/+263
|
* Improve errors for non-existent labelsSimon Peyton Jones2022-02-0411-46/+59
| | | | | | | | | | | | | | | | This patch fixes #17469, by improving matters when you use non-existent field names in a record construction: data T = MkT { x :: Int } f v = MkT { y = 3 } The check is now made in the renamer, in GHC.Rename.Env.lookupRecFieldOcc. That in turn led to a spurious error in T9975a, which is fixed by making GHC.Rename.Names.extendGlobalRdrEnvRn fail fast if it finds duplicate bindings. See Note [Fail fast on duplicate definitions] in that module for more details. This patch was originated and worked on by Alex D (@nineonine)
* Add a missing restoreLclEnvSimon Peyton Jones2022-02-041-2/+2
| | | | | | | | | | | | | | The commit commit 18df4013f6eaee0e1de8ebd533f7e96c4ee0ff04 Date: Sat Jan 22 01:12:30 2022 +0000 Define and use restoreLclEnv omitted to change one setLclEnv to restoreLclEnv, namely the one in GHC.Tc.Errors.warnRedundantConstraints. This new commit fixes the omission.
* Add Outputable instance for MessagesSimon Peyton Jones2022-02-041-2/+11
| | | | c.f. #20980
* Fix unsound behavior of unlifted datatypes in ghci (#20194)nineonine2022-02-049-21/+195
| | | | | | | | | | | | Previously, directly calling a function that pattern matches on an unlifted data type which has at least two constructors in GHCi resulted in a segfault. This happened due to unaccounted return frame info table pointer. The fix is to pop the above mentioned frame info table pointer when unlifted things are returned. See Note [Popping return frame for unlifted things] authors: bgamari, nineonine
* primops: Fix documentation of setByteArray#Ben Gamari2022-02-042-5/+8
| | | | | | Previously the documentation was subtly incorrect regarding the bounds of the operation. Fix this and add a test asserting that a zero-length operation is in fact a no-op.
* llvmGen: Handle unaligned loads/storesBen Gamari2022-02-041-7/+7
| | | | | This allows us to produce valid code for indexWord8ArrayAs*# on platforms that lack unaligned memory access.
* Fix array primop alignmentBen Gamari2022-02-042-21/+35
|
* Introduce alignment to CmmStoreBen Gamari2022-02-0418-80/+99
|
* Introduce alignment in CmmLoadBen Gamari2022-02-0426-158/+193
|
* cmm: Introduce cmmLoadBWord and cmmLoadGCWordBen Gamari2022-02-0411-23/+31
|
* Add commentsBen Gamari2022-02-041-0/+2
|
* Drop dead codeBen Gamari2022-02-041-2/+0
|
* Add the Ix class to Foreign C integral typesHécate Moonlight2022-02-045-2/+10
| | | | Related CLC proposal is here: https://github.com/haskell/core-libraries-committee/issues/30
* testsuite: Run testsuite dependency calculation before GHC is builtMatthew Pickering2022-02-0414-81/+212
| | | | | | | | | | | | | | | | | | | | The main motivation for this patch is to allow tests to be added to the testsuite which test things about the source tree without needing to build GHC. In particular the notes linter can easily start failing and by integrating it into the testsuite the process of observing these changes is caught by normal validation procedures rather than having to run the linter specially. With this patch I can run ``` ./hadrian/build test --flavour=devel2 --only="uniques" ``` In a clean tree to run the checkUniques linter without having to build GHC. Fixes #21029
* compiler: Introduce and use RoughMap for instance environmentsBen Gamari2022-02-0460-450/+1063
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here we introduce a new data structure, RoughMap, inspired by the previous `RoughTc` matching mechanism for checking instance matches. This allows [Fam]InstEnv to be implemented as a trie indexed by these RoughTc signatures, reducing the complexity of instance lookup and FamInstEnv merging (done during the family instance conflict test) from O(n) to O(log n). The critical performance improvement currently realised by this patch is in instance matching. In particular the RoughMap mechanism allows us to discount many potential instances which will never match for constraints involving type variables (see Note [Matching a RoughMap]). In realistic code bases matchInstEnv was accounting for 50% of typechecker time due to redundant work checking instances when simplifying instance contexts when deriving instances. With this patch the cost is significantly reduced. The larger constants in InstEnv creation do mean that a few small tests regress in allocations slightly. However, the runtime of T19703 is reduced by a factor of 4. Moreover, the compilation time of the Cabal library is slightly improved. A couple of test cases are included which demonstrate significant improvements in compile time with this patch. This unfortunately does not fix the testcase provided in #19703 but does fix #20933 ------------------------- Metric Decrease: T12425 Metric Increase: T13719 T9872a T9872d hard_hole_fits ------------------------- Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>
* ci: Add debian 11 jobs (validate/release/nightly)Matthew Pickering2022-02-031-1/+34
| | | | Fixes #21002
* Rewrite CallerCC parser using ReadPMatthew Pickering2022-02-036-14/+63
| | | | | | | | | | This allows us to remove the dependency on parsec and hence transitively on text. Also added some simple unit tests for the parser and fixed two small issues in the documentation. Fixes #21033
* Unbreak T13168 on windowsMatthew Pickering2022-02-031-2/+1
| | | | Fixes #14276
* Remove ghc_plugin_wayMatthew Pickering2022-02-033-46/+32
| | | | | | Using ghc_plugin_way had the unintended effect of meaning certain tests weren't run at all when ghc_dynamic=true, if you delete this modifier then the tests work in both the static and dynamic cases.