summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add test for #16197wip/T16197Ömer Sinan Ağacan2019-01-174-1/+39
|
* Documentation for StgRetFunÖmer Sinan Ağacan2019-01-162-1/+4
|
* Make sure 'haddock' package also copies resourcesAlec Theriault2019-01-166-34/+31
| | | | ...and does so in the lib folder of the right stage
* Hadrian: handle Haddock's resource directoryAlec Theriault2019-01-163-18/+29
| | | | | | | | | | | | | | | | Fixes #16105 * Require Haddock's resource as runtime dependencies of the Haddock builder. This means we no longer have to `need` particular resources in every other documentation rule. * Do a _tracked_ copy of both the 'html' and 'latex' folder resource folders. * Move resources into `stage1/lib` (NB: the `haddock` binary goes in `stage1/bin`). Besides now actually matching the Haddock script wrapper generated by BinaryDist, this also prepares for Haddock in relocatable build folder detecting its own resources.
* Improve clarity of documentation for maybeToListSteve Hart2019-01-161-1/+1
|
* Revert "Fix typo in maybeToList documentation"Steve Hart2019-01-161-1/+1
| | | This reverts commit af210f40ce7ad7b3351abc988b0351446e8b639e
* Fix typo in maybeToList documentationSteve Hart2019-01-161-1/+1
|
* Hadrian: Use the Cabal build script on Windows by defaultAndrey Mokhov2019-01-161-4/+2
| | | | | | | | | | | | | The Stack build script `build.stack.bat` currently fails on Windows when invoked with the `--configure` flag, see: https://ghc.haskell.org/trac/ghc/ticket/15982 The Cabal build script `build.cabal.bat` works reliably on my Windows machine, so I am proposing to switch to it by default, that is, to run it from the default `build.bat` script. The Stack build script can still be run directly if need be.
* Disable Shake Lint by default.Andrey Mokhov2019-01-166-9/+4
|
* Switch to the untracked version of getDirectoryFiles when scanning for GMP ↵Andrey Mokhov2019-01-162-6/+15
| | | | | | | | | objects See https://ghc.haskell.org/trac/ghc/ticket/15971. This is work in progress: this commit does the right thing, but does not yet fix the ticket.
* typoAlp Mestanogullari2019-01-161-1/+1
|
* crosslink hadrian/README.md and hadrian/doc/make.mdAlp Mestanogullari2019-01-162-2/+13
|
* doc: behaviour of +RTS -h depends on profilingBen Price2019-01-162-0/+9
| | | | | | The rts option `-h` behaves as `-hT` when compiled without profiling, and `-hc` when compiled with profiling. Add a note to the user's guide highlighting this inconsistency.
* doc: reorder heap profiling information in +RTS -?Ben Price2019-01-161-6/+5
|
* rts: Allow heap prof by closure type in prof wayBen Price2019-01-161-0/+1
| | | | | | Complete b7b6617a90824303daf555c817f538cd9c792671 (see ticket #15086) to actually enable profiling by closure type in the profiling rts. I.e. +RTS -p -hT is now accepted.
* try to fix CIAlec Theriault2019-01-161-0/+2
|
* Fix tests for `integer-simple`Alec Theriault2019-01-1636-141/+143
| | | | | | | | | | | | A bunch of tests for `integer-simple` were now broken for a foolish reason: unlike the `integer-gmp` case, there is no CorePrep optimization for turning small integers directly into applications of `S#`. Rather than port this optimization to `integer-simple` (which would involve moving a bunch of `integer-simple` names into `PrelNames`), I switched as many tests as possible to use `Int`. The printing of `Integer` is already tested in `print037`.
* Remove from `base` obsolete CPP for `integer-gmp`Alec Theriault2019-01-167-162/+26
| | | | | | | | | | * `GHC.Natural` now exports the same functions (regardless of integer backend) * remove unnecessary CPP around instances * remove the 'OPTIMISE_INTEGER_GCD_LCM' flag - almost all of those optimizations now work regardless of which integer backend is used Note that some CPP still remains for situations where there are backend-specific optimization hacks (like a more efficient GMP-only `gcd` for `Int#` and `Word#`).
* Match `integer-simple`'s API with `integer-gmp`Alec Theriault2019-01-164-8/+99
| | | | | | | | In `integer-simple`: * Added an efficient `popCountInteger` and `bitInteger` * Added an efficient `gcdInteger` and `lcmInteger` * Made `testBitInteger` more efficient
* Support printing `integer-simple` Integers in GHCiAlec Theriault2019-01-167-2/+80
| | | | | | | | | | This means that `:p` no longer leaks the implementation details of `Integer` with `integer-simple`. The `print037` test case should exercise all possible code paths for GHCi's code around printing `Integer`s (both in `integer-simple` and `integer-gmp`). `ghc` the package now also has a Cabal `integer-simple` flag (like the `integer-gmp` one).
* Create folder if missing for .hie filesAlec Theriault2019-01-161-3/+5
| | | | | | | | | | | | | | | Summary: This matches the existing behaviour for .hi files: if the user requests the interface file be written in some location, we should create the parent folder if it doesn't already exist. Reviewers: bgamari, sjakobi Reviewed By: sjakobi Subscribers: sjakobi, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5463
* Hadrian: support extra libraries + OSX rpathAlec Theriault2019-01-165-24/+34
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This fixes some of the issues that surfaced when trying to build dynamic GHC on OSX. Unfortunately, due some other `libffi` issues, this doesn't completely fix dynamic builds on OSX. - Use 'extra-libraries' from .cabal files instead of hardcoding which packages need which extra libs. Also add support for 'extra-lib-dirs'. - Make sure Hadrian looks in the right places to support both plain '<pkg>.buildinfo' and '<pkg>.buildinfo.in' files. - Make the '-rpath' support more robust across OS's (it previously didn't work on OSX and possibly windows either). Reviewers: angerman, alpmestan, adamse, DavidEichmann, bgamari, Phyx Subscribers: rwbarton, carter GHC Trac Issues: #15990 Differential Revision: https://phabricator.haskell.org/D5409
* Introduce ghci command wrapperZejun Wu2019-01-162-33/+76
| | | | | | | | | | Introduce ghci command wrapper, which can be used to cutomize ghci: * process additionals actions before/after the command * handle particular exceptions in given ways * logging stats We also split the timing and printing part of `timeIt` into different functions.
* Fix filename in comment againPeter Trommler2019-01-161-1/+1
|
* Fix reference to stack code in commentPeter Trommler2019-01-161-1/+1
|
* PPC NCG: Refactor stack allocation codePeter Trommler2019-01-162-26/+15
| | | | | There is only one place where UPDATE_SP was used. Instead of the UPDATE_SP pseudo instruction build the list of instructions directly.
* Hadrian: configure packages with right 'htmldir'Alec Theriault2019-01-164-6/+21
| | | | | | | | | This means that we can query the package DB for haddock interfaces. Haddock uses this in its testsuite. 'cabal {v1-,v2,}-haddock' also uses this. Also thread through to Haddock package-specific overrides of GHC warnings.
* Change comments as requested by code review. #10857Roland Senn2019-01-162-7/+28
|
* GHCi ignores cmd line flags XMonomorphismRestr.. XNoExtendedDef..#10857Roland Senn2019-01-167-2/+43
|
* hWaitForInput-accurate-socket testTom Sydney Kerckhove2019-01-163-0/+50
|
* @simonpj's suggested refactorRyan Scott2019-01-151-36/+71
|
* Bump Cabal submoduleRyan Scott2019-01-151-0/+0
|
* Control validity-checking of type synonym applications more carefullyRyan Scott2019-01-1514-70/+271
| | | | | | | | | | | | | | | | | | | | Trac #16059 shows that when validity checking applications of type synonyms, GHC sometimes wasn't checking the expanded type enough. We must be careful, however, since checking both the expanded type as well as the arguments to the type synonym can lead to exponential blowup (see https://ghc.haskell.org/trac/ghc/ticket/16059#comment:4). Nor can we omit checking either the expanded type or the argument for correctness reasons. The solution here is to introduce a new `ExpandMode` data type that is plumbed through all of the type-validity-checking functions in `TcValidity`. `ExpandMode` dictates whether we only check the expanded type (`Expand`), only check the arguments (`NoExpand), or both (`Both`). Importantly, if we check `Both` in the function for validity checking type synonym applications, then we switch to `NoExpand` when checking the arguments so as to avoid exponential blowup. See `Note [Correctness and performance of type synonym validity checking]` for the full story.
* Fix #16116 by removing badAssocRhsRyan Scott2019-01-157-22/+57
|
* Fix #16114 by adding a validity check to rnClsInstDeclRyan Scott2019-01-156-27/+35
|
* gitlab-ci: Cleanup Windows buildsBen Gamari2019-01-141-0/+30
| | | | See Note [Cleanup on Windows].
* Document the Shake Lint feature.Andrey Mokhov2019-01-141-0/+5
|
* Clarify when to follow the instructions in doc/windows.md.Andrey Mokhov2019-01-141-4/+8
| | | | See https://gitlab.haskell.org/ghc/ghc/merge_requests/100#note_2349.
* Hadrian: Update README.mdAndrey Mokhov2019-01-141-90/+91
| | | | | | | * Update or remove a few outdated paragraphs * Use consistent naming (e.g. "Stage1" instead of occasionally "stage1") * Rewrite acknowledgements * Some more minor revisions
* testsuite: Show both test name and way in JUnit outputBen Gamari2019-01-141-6/+6
|
* Update `Cabal` submoduleHerbert Valerio Riedel2019-01-147-181/+158
| | | | | | | This also requires adapting `ghc-pkg` to use the new Cabal parsing API as the old ReadP-based one has finally been evicted for good. Hadrian bit finished by: Ben Gamari <ben@smart-cactus.org>
* rts: Use always-available locking operations in pthread Itimer implementationBen Gamari2019-01-141-6/+6
| | | | | | Previously we ACQUIRE_LOCK and RELEASE_LOCK but these compile to a noop in the non-threaded RTS, as noted in #16150. Use OS_ACQUIRE_LOCK and OS_RELEASE_LOCK instead.
* itimer: Don't free condvar until we know ticker is stoppedBen Gamari2019-01-141-2/+2
| | | | | | | | | | | When we are shutting down the pthread ticker we signal the start_cond condition variable to ensure that the ticker thread wakes up and exits in a reasonable amount of time. Previously, when the ticker thread would shut down it was responsible for freeing the start_cond condition variable. However, this would lead to a race wherein the ticker would free start_cond, then the main thread would try to signal it in an effort to wake the ticker (#16150). Avoid this by moving the mutex destruction to the main thread.
* PPC NCG: Reduce memory consumption emitting string literalsPeter Trommler2019-01-134-66/+55
|
* Refactor GHCi UI to fix #11606, #12091, #15721, #16096Ömer Sinan Ağacan2019-01-1316-76/+246
| | | | | | | | | | | | | Instead of parsing and executing a statement or declaration directly we now parse them first and then execute in a separate step. This gives us the flexibility to inspect the parsed declaration before execution. Using this we now inspect parsed declarations, and if it's a single declaration of form `x = y` we execute it as `let x = y` instead, fixing a ton of problems caused by poor declaration support in GHCi. To avoid any users of the modules I left `execStmt` and `runDecls` unchanged and added `execStmt'` and `runDecls'` which work on parsed statements/declarations.
* Fix checkPtrInArenaÖmer Sinan Ağacan2019-01-131-2/+11
| | | | (See comments)
* Don't invoke dataConSrcToImplBang on newtypesRyan Scott2019-01-123-7/+55
|
* Fix negative mutator time in GC stats in prof buildsÖmer Sinan Ağacan2019-01-126-49/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because garbage collector calls `retainerProfile()` and `heapCensus()`, GC times normally include some of PROF times too. To fix this we have these lines: // heapCensus() is called by the GC, so RP and HC time are // included in the GC stats. We therefore subtract them to // obtain the actual GC cpu time. stats.gc_cpu_ns -= prof_cpu; stats.gc_elapsed_ns -= prof_elapsed; These variables are later used for calculating GC time excluding the final GC (which should be attributed to EXIT). exit_gc_elapsed = stats.gc_elapsed_ns - start_exit_gc_elapsed; The problem is if we subtract PROF times from `gc_elapsed_ns` and then subtract `start_exit_gc_elapsed` from the result, we end up subtracting PROF times twice, because `start_exit_gc_elapsed` also includes PROF times. We now subtract PROF times from GC after the calculations for EXIT and MUT times. The existing assertion that checks INIT + MUT + GC + EXIT = TOTAL now holds. When we subtract PROF numbers from GC, and a new assertion INIT + MUT + GC + PROF + EXIT = TOTAL also holds. Fixes #15897. New assertions added in this commit also revealed #16102, which is also fixed by this commit.
* Fix raiseAsync() UNDERFLOW_FRAME handling in profiling runtimeÖmer Sinan Ağacan2019-01-122-8/+8
| | | | | | | UNDERFLOW_FRAMEs don't have profiling headers so we have to use the AP_STACK's function's CCS as the new frame's CCS. Fixes one of the many bugs caught by concprog001 (#15508).
* Documentation and refactoring in CCS related codeÖmer Sinan Ağacan2019-01-124-69/+56
| | | | | | | | | - Remove REGISTER_CC and REGISTER_CCS macros, add functions registerCC and registerCCS to Profiling.c. - Reduce scope of symbols: CC_LIST, CCS_LIST, CC_ID, CCS_ID - Document CC_LIST and CCS_LIST