summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* rts: Move mmapForLinker and friends to linker/MMap.cBen Gamari2022-02-0911-341/+377
| | | | They are not particularly related to linking.
* rts: Rename MemoryMap.[ch] -> ReportMemoryMap.[ch]Ben Gamari2022-02-095-4/+4
|
* Include ru_name in toHsRule messageZiyang Liu2022-02-092-11/+9
| | | | See #18147
* ByteCode: avoid out-of-bound readSylvain Henry2022-02-091-5/+15
| | | | Cf https://gitlab.haskell.org/ghc/ghc/-/issues/18431#note_287139
* NCG: minor code factorizationSylvain Henry2022-02-092-51/+35
|
* driver: Filter out our own boot module in hptSomeThingsBelowMatthew Pickering2022-02-091-2/+5
| | | | | | | | | hptSomeThingsBelow would return a list of modules which contain the .hs-boot file for a particular module. This caused some problems because we would try and find the module in the HPT (but it's not there when we're compiling the module itself). Fixes #21058
* Rename -merge-objs flag to --merge-objsBen Gamari2022-02-094-4/+4
| | | | For consistency with --make and friends.
* Add test for #21037sheaf2022-02-092-0/+25
| | | | | | | This program was rejected by GHC 9.2, but is accepted on newer versions of GHC. This patch adds a regression test. Closes #21037
* Look through untyped TH splices in tcInferAppHead_maybeRyan Scott2022-02-094-13/+43
| | | | | | | | | | | Previously, surrounding a head expression with a TH splice would defeat `tcInferAppHead_maybe`, preventing some expressions from typechecking that used to typecheck in previous GHC versions (see #21038 for examples). This is simple enough to fix: just look through `HsSpliceE`s in `tcInferAppHead_maybe`. I've added some additional prose to `Note [Application chains and heads]` in `GHC.Tc.Gen.App` to accompany this change. Fixes #21038.
* Fix a portability issue in m4/find_llvm_prog.m4PHO2022-02-091-1/+1
| | | | | `test A == B' is a Bash extension, which doesn't work on platforms where /bin/sh is not Bash.
* Implement System.Environment.getExecutablePath for NetBSDPHO2022-02-092-6/+14
| | | | and also use it from GHC.BaseDir.getBaseDir
* testsuite: Add missing dependency on ghcconfigMatthew Pickering2022-02-091-1/+6
|
* testsuite: Clean up old/redundant predicatesMatthew Pickering2022-02-093-30/+1
|
* testsuite: Use absolute paths for config.libdirMatthew Pickering2022-02-091-2/+4
| | | | Fixes #21052
* 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.