summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ghc-prim: Bump versionBen Gamari2017-07-2363-65/+65
| | | | (cherry picked from commit 8c5405f63c2de0c445ec171aab63c35786544b9e)
* Bump integer-gmp versionBen Gamari2017-07-233-4/+10
| | | | (cherry picked from commit 09396ec3bb672e761c3e627484dd02c5a3a76c77)
* Update release notes for 8.2.1Ben Gamari2017-07-231-98/+105
| | | | This pulls over changes that were made in the ghc-8.2 branch.
* Bump a bunch of submodulesBen Gamari2017-07-239-0/+0
|
* Preserve HaskellHaveRTSLinker in bindistBen Gamari2017-07-231-0/+3
| | | | | Otherwise you end up with ("target has RTS linker","@HaskellHaveRTSLinker@") in the installed settings file.
* users-guide: Improve legibility of OverlappingInstances documentationBen Gamari2017-07-231-6/+6
| | | | | | | | Reviewers: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3776
* distrib/configure: Carry FFI include/lib paths from source distributionBen Gamari2017-07-231-0/+7
| | | | | | | | | | | | | | | | | | | `FFILibDir` and `FFIIncludeDir` both show up in the `rts` library's package registration file. We therefore must define them or else we'll end up with spurious `@FFILibDir@` strings in the package registration. In principle I think we could also take these as arguments to the bindist configure but this seems simpler and I don't want to verify this at the moment. Test Plan: Build bindist while passing `--with-ffi-libraries=...` to source distribution configure then try to install and use bindist. Reviewers: austin, hvr Subscribers: rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D3774
* Update autoconf scriptsBen Gamari2017-07-233-15/+36
| | | | Scripts taken from autoconf 81497f5aaf50a12a9fe0cba30ef18bda46b62959
* Avoid linear lookup in unload_wkr in the LinkerBartosz Nitka2017-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | I've encountered an issue with following reproduction steps: * `:load` a large number of modules (~2000) * compile a BCO that depends on many other BCOs from many other modules * `:reload` * try to compile anything, even `1` works Before this patch the last step takes ~5s. It takes 80ms after. Test Plan: harbormaster Reviewers: simonmar, austin, hvr, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3770
* fix dllwrap issue.Tamar Christina2017-07-221-5/+5
| | | | | | | | | | | | | | Summary: Always set dllwrap and windres values. Reviewers: austin, hvr, bgamari, trofi Reviewed By: trofi Subscribers: rwbarton, thomie, erikd GHC Trac Issues: #13792 Differential Revision: https://phabricator.haskell.org/D3775
* Fix ungrammatical error messageRyan Scott2017-07-212-2/+2
| | | | | | | | | | | | Test Plan: If it builds, ship it Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3772
* build system: Ensure there are no duplicate files in bindist listBen Gamari2017-07-201-1/+3
| | | | | | | | | | | | | | | | | | | Several executables inexplicably appear twice in bindist.list, which ends up producing multiple tar file entries, consequently breaking BSD tar during extraction. I spent a fair amount of time trying to work out where these duplicates were coming from to no avail. Since Hadrian is right around the corner I'm satisfied with a terrible hack: just uniq bindist.list before producing the bindist tarball. Test Plan: Validate Reviewers: austin Subscribers: rwbarton, thomie GHC Trac Issues: #13979, #13974 Differential Revision: https://phabricator.haskell.org/D3767
* HsPat: Assume that no spliced patterns are irrefutableBen Gamari2017-07-203-9/+17
| | | | | | | | | | | | | | | | | This is a conservative assumption which will limit some uses of spliced patterns, but it fixes #13984. Test Plan: Validate Reviewers: RyanGlScott, AaronFriel, austin Reviewed By: RyanGlScott Subscribers: rwbarton, thomie GHC Trac Issues: #13984 Differential Revision: https://phabricator.haskell.org/D3766
* Revert "testsuite: Add test for #13916"Ben Gamari2017-07-203-169/+0
| | | | | This reverts commit b2d3ec370b97fe5f448e8f1d4e0b7374c63c60a8. Didn't mean to push this one.
* testsuite: Add test for #13916Ben Gamari2017-07-203-0/+169
|
* distrib/configure: Canonicalize triplesBen Gamari2017-07-201-0/+7
| | | | | | | | | | | | | | | | Previously we failed to do this, which meant that the bindist's configure would fail when passed --target (as you may need to do when installing an armv7 bindist on an aarch64 machine, for instance). Reviewers: hvr, erikd, austin Reviewed By: hvr Subscribers: rwbarton, thomie GHC Trac Issues: #13934 Differential Revision: https://phabricator.haskell.org/D3761
* rts: Claim AP_STACK before adjusting SpBen Gamari2017-07-201-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | In the fix to #13615 we introduced some logic to atomically blackhole AP_STACKs closures upon entry. However, this logic was placed *after* a stack pointer adjustment. This meant that if someone else beat us to blackholing the AP_STACK we would suspend the thread with uninitialized content on the stack. This would then later blow up when threadPaused attempted to walk the stack, hence #13970. Silly bug but still cost lots of head-scratching to find. Thanks to albertov for the great repro. Fixes #13970. Bug originally introduced by the fix to #13615. Reviewers: austin, erikd, simonmar Reviewed By: erikd, simonmar Subscribers: rwbarton, thomie GHC Trac Issues: #13970, #13615 Differential Revision: https://phabricator.haskell.org/D3760
* Interpreter.c: use macros to access/modify SpMichal Terepeta2017-07-201-227/+240
| | | | | | | | | | | | | | | | | | | | | | | This is another step in fixing #13825 (based on D38 by Simon Marlow). This commit adds a few macros for accessing and modifying `Sp` (interpreter stack) and will be useful to allow sub-word indexing/pushing. (but that will be a separate change, this commit should introduce no changes in behavior) Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com> Test Plan: ./validate Reviewers: bgamari, simonmar, austin, erikd Reviewed By: bgamari, erikd Subscribers: rwbarton, thomie GHC Trac Issues: #13825 Differential Revision: https://phabricator.haskell.org/D3744
* Make IfaceAxiom typechecking lazier.Edward Z. Yang2017-07-2010-12/+107
| | | | | | | | | | | | | | | | | | Fixes #13803, but adds a note about a yet to be fixed #13981. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: simonpj, rwbarton, thomie GHC Trac Issues: #13803 Differential Revision: https://phabricator.haskell.org/D3742
* Fix busy-wait in SysTools.builderMainLoopDouglas Wilson2017-07-202-44/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test T13701 was failing sporadically. The problem manifested while the test was run on a system under load. Profiling showed the increased allocations were in SysTools.builderMainLoop.loop, during calls to the assembler. This was due to loop effectively busy-waiting from when both stdin and stderr handles were closed, until getProcessExitCode succeeded. This is fixed by removing exit code handling from loop. We now wait for loop to finish, then read the exit code with waitForProcess. Some exception safety is added: the readerProc threads will now be killed and the handles will be closed if an exception is thrown. A TODO saying that threads dying is not accounted for is removed. I believe that this case is handled by readerProc sending EOF in a finally clause. Test Plan: Replicate test failures using procedure on the ticket, verify that they do not occur with this patch. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13987 Differential Revision: https://phabricator.haskell.org/D3748
* arcconfig: Set project ruleset to use master merge-base by defaultBen Gamari2017-07-201-0/+1
| | | | | | | | Reviewers: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3728
* testsuite: Pipe stdin directly to processBen Gamari2017-07-201-11/+5
| | | | | | | | | | | | | | Previously the driver would read the stdin content from the source file and then write it to the subprocess' stdin. We now simply open the stdin file and provide that handle to the subprocess as its stdin Test Plan: Validate Reviewers: austin Subscribers: rwbarton, thomie, goldfire Differential Revision: https://phabricator.haskell.org/D3735
* Introduce -fcatch-bottomsBen Gamari2017-07-205-2/+31
| | | | | | | | | | | | | | | This flag instructs the simplifier to emit ``error`` expressions in the continutation of empty case analyses (which should bottom and consequently not return). This is helpful when debugging demand analysis bugs which can sometimes manifest as segmentation faults. Test Plan: Validate Reviewers: simonpj, austin Subscribers: niteria, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3736
* Demand: Improve commentsBen Gamari2017-07-201-23/+26
| | | | | | | | | | [skip-ci] Reviewers: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3737
* Spelling fixesGabor Greif2017-07-2012-15/+15
|
* Typeable: Ensure that promoted data family instance tycons get bindingsBen Gamari2017-07-198-10/+40
| | | | | | | | | | | | | | | | | | This fixes #13915, where the promoted tycons belonging to data family instances wouldn't get Typeable bindings, resulting in missing declarations. Test Plan: Validate with included testcases Reviewers: austin, simonpj Reviewed By: simonpj Subscribers: simonpj, RyanGlScott, rwbarton, thomie GHC Trac Issues: #13915 Differential Revision: https://phabricator.haskell.org/D3759
* base: Improve docs to clarify when finalizers may not be runAndrew Martin2017-07-191-0/+26
|
* typo: -XUndeci[d]ableInstancesChris Martin2017-07-191-1/+1
|
* Fix #13983 by creating a TyConFlavour type, and using itRyan Scott2017-07-199-66/+161
| | | | | | | | | | | | | | | | | | | | | | | | | An error message was referring to a type synonym as a datatype. Annoyingly, learning that the TyCon over which the error message is operating is actually a type synonym was previously impossible, since that code only had access to a TcTyCon, which doesn't retain any information about what sort of TyCon it is. To rectify this, I created a new TyConFlavour datatype, intended to capture roughly what sort of TyCon we're dealing with. I then performing the necessary plumbing to ensure all TcTyCons have a TyConFlavour, and propagated this information through to the relevant error message. Test Plan: ./validate Reviewers: goldfire, austin, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie GHC Trac Issues: #13983 Differential Revision: https://phabricator.haskell.org/D3747
* dmdAnal: Ensure that ExnStr flag isn't dropped inappropriatelyBen Gamari2017-07-191-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes #13977 and consequently #13615. Here an optimization in the demand analyser was too liberal, causing us to drop the ExnStr flag and consequently resulting in incorrect demand signatures. This manifested as a segmentation fault in #13615 as we incorrectly concluded that an application of catchRetry# would bottom. Specifically, we had orElse' :: STM a -> STM a -> STM a orElse' x = catchRetry# x y where y = {- some action -} Where the catchRetry# primop places a demand of <xC(S),1*C1(U)> on its first argument. However, due to #13977 the demand analyser would assign a demand of <C(S),1*C1(U)> on the first argument of orElse'. Note the missing `x`. case orElse' bottomingAction anotherAction of { x -> Just x } being transformed to, case orElse' bottomingAction anotherAction of {} by the simplifier. This would naturally blow up when orElse' returned at runtime, causing the segmentation fault described in #13615. Test Plan: Validate, perhaps add a testcase Reviewers: austin, simonpj Reviewed By: simonpj Subscribers: rwbarton, thomie GHC Trac Issues: #13977, #13615 Differential Revision: https://phabricator.haskell.org/D3756
* Add Haddocks for Eq (STRef a) and Eq (IORef a)Adam Sandberg Eriksson2017-07-192-7/+7
| | | | | | | | | | Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: RyanGlScott, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3750
* Fix links to SPJ’s papers (fixes #12578)Takenobu Tani2017-07-194-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | This fixes #12578. Update links to SPJ's papers in following files: * compiler/coreSyn/CoreSyn.hs * docs/users_guide/using-optimisation.rst * docs/users_guide/parallel.rst * docs/users_guide/glasgow_exts.rst This commit is for ghc-8.2 branch. Test Plan: build Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #12578 Differential Revision: https://phabricator.haskell.org/D3745
* Allow visible type application for []Ryan Scott2017-07-193-0/+37
| | | | | | | | | | | | | | | | | | | | | This amounts to a one-line change in `tcExpr`. I've added a Note to explain what is going on. This requires a separate change in the pattern-match checker to account for the fact that typechecked `[]` expressions become `ConLikeOut`s, not `ExplicitList`s. Test Plan: make test TEST=T13680 Reviewers: goldfire, mpickering, austin, bgamari Reviewed By: mpickering, bgamari Subscribers: rwbarton, thomie, goldfire GHC Trac Issues: #13680 Differential Revision: https://phabricator.haskell.org/D3733
* testsuite: Ensure that hs_try_putmvar003 terminatesBen Gamari2017-07-192-5/+9
| | | | | | | | | | | | | | Test Plan: Validate Reviewers: austin, simonmar Reviewed By: simonmar Subscribers: simonmar, rwbarton, thomie GHC Trac Issues: #13434 Differential Revision: https://phabricator.haskell.org/D3724
* configure: Cleanup ARM COPY bug test artifactsBen Gamari2017-07-181-1/+3
|
* Typeable: Always use UTF-8 string unpacking primitiveBen Gamari2017-07-181-6/+6
| | | | | | | | Reviewers: austin, hvr Subscribers: Phyx, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3734
* Make module membership on ModuleGraph fasterBartosz Nitka2017-07-1814-74/+158
| | | | | | | | | | | | | | | | | | | When loading/reloading with a large number of modules (>5000) the cost of linear lookups becomes significant. The changes here made `:reload` go from 6s to 1s on my test case. The bottlenecks were `needsLinker` in `DriverPipeline` and `getModLoop` in `GhcMake`. Test Plan: ./validate Reviewers: simonmar, austin, bgamari Subscribers: thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D3703
* Typos in comments and explanation for unusused importsGabor Greif2017-07-184-9/+9
|
* Fix a missing getNewNursery(), and related cleanupSimon Marlow2017-07-182-27/+14
| | | | | | | | | | | | | | | | | | | | Summary: When we use nursery chunks with +RTS -n<size>, when the current nursery runs out we have to check whether there's another chunk available with getNewNursery(). There was one place we weren't doing this: the ad-hoc heap check in scheduleProcessInbox(). The impact of the bug was that we would GC too early when using nursery chunks, especially in programs that used messages (throwTo between capabilities could do this, also hs_try_putmvar()). Test Plan: validate, also local testing in our application Reviewers: bgamari, niteria, austin, erikd Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3749
* [skip ci] Temporarily disable split-sections on Windows.Tamar Christina2017-07-131-2/+3
| | | | | | | | | | | | | | | | | | | | | Summary: This temporarily disabled split-sections again on Windows because of the overhead in linking it introduces. Unfortunately because BFD is so slow a testsuite run gets almost 2x slower. Simply linking Hello World takes an unacceptable long time. So for now, it'll be disabled as we look into different linkers such as LLD. Test Plan: ./validate Reviewers: austin, bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #12913 Differential Revision: https://phabricator.haskell.org/D3731
* Fix some excessive spacing in error messagesRyan Scott2017-07-124-15/+15
| | | | | | | | | | Test Plan: If it builds, ship it Reviewers: austin, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3729
* testsuite: Again update allocations of T13701Ben Gamari2017-07-121-1/+2
| | | | This test appears to be quite unstable.
* testsuite: Update haddock allocationsBen Gamari2017-07-121-2/+4
| | | | It seems to be the change to getNameToInstancesIndex that bumped these.
* [iserv] Fixing the word size for RemotePtr and toWordArrayBen Gamari2017-07-1210-67/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | When we load non absolute pathed .so's this usually implies that we expect the system to have them in place already, and hence we should not need to ship them. Without the absolute path to the library, we are also unable to open and send said library. Thus we'll do library shipping only for libraries with absolute paths. When dealing with a host and target of different word size (say host hast 64bit, target has 32bit), we need to fix the RemotePtr size and the toWordArray function, as they are part of the iserv ResolvedBCO binary protocol. This needs to be word size independent. The choice for RemotePtr to 64bit was made to ensure we can store 64bit pointers when targeting 64bit. The choice for 32bit word arrays was made wrt. encoding/decoding on the potentially slower device. The efficient serialization code has been graciously provided by @bgamari. Reviewers: bgamari, simonmar, austin, hvr Reviewed By: bgamari Subscribers: Ericson2314, rwbarton, thomie, ryantrinkle Differential Revision: https://phabricator.haskell.org/D3443
* distrib/configure: Fail if we can't detect machine's word sizeBen Gamari2017-07-123-6/+16
| | | | | | | | | | | | | | | | | | This is a sure sign that something is terribly wrong. We also now verify that the word size that the binary distribution expects matches the word size produced by the local target toolchain. Finally we rename WordSize to TargetWordSize, since non-host/target qualified quantities are terribly confusing. Reviewers: austin, hvr, Phyx Reviewed By: Phyx Subscribers: Phyx, rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D3711
* Fix missing escape in macroMoritz Angermann2017-07-121-1/+1
| | | | | | | | | | Reviewers: angerman, austin, bgamari, erikd, simonmar Reviewed By: angerman Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3727
* Use correct section types syntax for architectureBen Gamari2017-07-118-19/+47
| | | | | | | | | | | | | | | | | | Previously GHC would always assume that section types began with `@` while producing assembly, which is not true. For instance, in ARM assembly syntax section types begin with `%`. This abstracts out section type pretty-printing and adjusts it to correctly account for the target architectures assembly flavor. Reviewers: austin, hvr, Phyx Reviewed By: Phyx Subscribers: Phyx, rwbarton, thomie, erikd GHC Trac Issues: #13937 Differential Revision: https://phabricator.haskell.org/D3712
* Mention which -Werror promoted a warning to an errorÖmer Sinan Ağacan2017-07-1128-148/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously -Werror or -Werror=flag printed warnings as usual and then printed these two lines: <no location info>: error: Failing due to -Werror. This is not ideal: first, it's not clear which flag made one of the warnings an error. Second, warning messages are not modified in any way, so there's no way to know which warnings caused this error. With this patch we (1) promote warning messages to error messages if a relevant -Werror is enabled (2) mention which -Werror is used during this promotion. Previously: [1 of 1] Compiling Main ( test.hs, test.o ) test.hs:9:10: warning: [-Wincomplete-patterns] Pattern match(es) are non-exhaustive In a case alternative: Patterns not matched: (C2 _) | 9 | sInt s = case s of | ^^^^^^^^^... test.hs:12:14: warning: [-Wmissing-fields] • Fields of ‘Rec’ not initialised: f2 • In the first argument of ‘print’, namely ‘Rec {f1 = 1}’ In the expression: print Rec {f1 = 1} In an equation for ‘main’: main = print Rec {f1 = 1} | 12 | main = print Rec{ f1 = 1 } | ^^^^^^^^^^^^^ <no location info>: error: Failing due to -Werror. Now: [1 of 1] Compiling Main ( test.hs, test.o ) test.hs:9:10: error: [-Wincomplete-patterns, -Werror=incomplete-patterns] Pattern match(es) are non-exhaustive In a case alternative: Patterns not matched: (C2 _) | 9 | sInt s = case s of | ^^^^^^^^^... test.hs:12:14: error: [-Wmissing-fields, -Werror=missing-fields] • Fields of ‘Rec’ not initialised: f2 • In the first argument of ‘print’, namely ‘Rec {f1 = 1}’ In the expression: print Rec {f1 = 1} In an equation for ‘main’: main = print Rec {f1 = 1} | 12 | main = print Rec{ f1 = 1 } | ^^^^^^^^^^^^^ Test Plan: - Update old tests, add new tests if there aren't any relevant tests Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3709
* Remove redundant import; fix noteDavid Feuer2017-07-112-6/+3
| | | | | | | | | | | | | | | * Remove the redundant import of `Data.Maybe` from `GHC.Foreign`. * Fix the note in `GHC.Stack.Types` to give a correct explanation of the problematic cycle. Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3722
* Fix minor typoIsmail2017-07-111-1/+1
|