summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* gitlab-ci: Don't save artifacts for unreg and integer-simple waysBen Gamari2018-12-131-1/+6
|
* Add some complexities to Data.List documentation (#15003)Sven Tennie2018-12-132-16/+26
| | | | Describe complexity and add an example for `GHC.List.filter`.
* llvmGen: Fix minor correctness issueGabor Greif2018-12-131-1/+1
| | | | | | The alias is of type i8, so its global variable name should have type i8*. Anyway we should never deal with pointers to (i8*)!
* Fix broken link in comment (#16010)Sven Tennie2018-12-131-1/+1
|
* Remove another unused import from WwLibSimon Peyton Jones2018-12-131-1/+1
|
* Show recursive Stg bindings in Rec {} blocksÖmer Sinan Ağacan2018-12-131-2/+3
| | | | | | | | | | | | Makes the printer same as Rec binding printer in Core Reviewers: sgraf, bgamari Reviewed By: sgraf Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5441
* testsuite: Normalise away package name differences from safePkg01Ben Gamari2018-12-121-1/+1
| | | | Spurious changes observed in a integer-simple build. In service of #16043.
* testsuite: Normalise away spurious differences in out-of-scope instancesBen Gamari2018-12-125-6/+15
| | | | | | | | | | | | | | | | | | | | This fixes a variety of testsuite failures with integer-simple of the form ``` --- typecheck/should_fail/tcfail072.run/tcfail072.stderr.normalised +++ typecheck/should_fail/tcfail072.run/tcfail072.comp.stderr.normalised @@ -12,7 +12,7 @@ -- Defined in ‘integer-<IMPL>-<VERSION>:GHC.Integer.Type’ instance Ord () -- Defined in ‘GHC.Classes’ ...plus 21 others - ...plus three instances involving out-of-scope types + ...plus two instances involving out-of-scope types (use -fprint-potential-instances to see them all) In the expression: g A In an equation for ‘g’: g (B _ _) = g A ``` In service of fixing #16043.
* testsuite: Fix a number of GHCi-related failures due to integer-simpleBen Gamari2018-12-125-30/+38
| | | | Towards fixing #16043.
* testsuite: Print which ways we are going to runBen Gamari2018-12-121-1/+4
|
* configure: Disable LD_NO_GOLD logic when cross-compilingBen Gamari2018-12-121-1/+5
| | | | | | | | | | | This is generally terrible: see #16025. In short, we previously just blindly used an un-prefixed ld for LD_NO_GOLD. This is blatantly wrong. Ideally we would actually verify that ld.gold is indeed broken (by binutils #22266) before insisting on using another linker but sadly we cannot do so when cross-compiling since this would require running host code. For now we simply disable the LD_NO_GOLD logic when cross-compiling and hope that the user has verified that their ld.gold isn't affected by #22266.
* RetainerProfiler: Update retainer profiler debuggingAlexander Vershilov2018-12-121-125/+85
| | | | | | | | | | | | | Debug code have not been updated for a long time, now it's changed to it compiles with recent RTS. Reviewers: bgamari, erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5369
* testsuite: Try accepting new output for memcpy testBen Gamari2018-12-121-2/+2
| | | | See #16037.
* Enable more GitLab CI waysBen Gamari2018-12-121-9/+45
| | | | But allow failure since CircleCI is still our source of truth.
* gitlab-ci: Fix job namesBen Gamari2018-12-121-4/+4
|
* gitlab-ci: Enable Haddock documentationBen Gamari2018-12-121-1/+1
|
* Fix recompilation checking of pure pluginsDaniel Gröber2018-12-126-15/+132
| | | | | | | | | | | | | | | | | | | Previously when switching from using a Plugin with `RecompMaybe`/`ForceRecompile` in `pluginRecompile` to a Plugin with `NoForceRecompile` GHC would never even consider recompiling. However the previously active plugin could have modified the compilation output so we should recompile. Test Plan: validate Reviewers: bgamari, mpickering Subscribers: mpickering, rwbarton, carter GHC Trac Issues: #15858 Differential Revision: https://phabricator.haskell.org/D5299
* Remove dead codeSimon Peyton Jones2018-12-121-14/+0
| | | | | | | This is a follow-up to d77501cd5b Improvements to demand analysis I forgot to remove some now-dead code
* Improvements to demand analysisSimon Peyton Jones2018-12-1217-190/+258
| | | | | | | | | | | | | | | | | | | | | | | | This patch collects a few improvements triggered by Trac #15696, and fixing Trac #16029 * Stop making toCleanDmd behave specially for unlifted types. This special case was the cause of stupid behaviour in Trac #16029. And to my joy I discovered the let/app invariant rendered it unnecessary. (Maybe the special case pre-dated the let/app invariant.) Result: less special-case handling in the compiler, and better perf for the compiled code. * In WwLib.mkWWstr_one, treat seqDmd like U(AAA). It was not being so treated before, which again led to stupid code. * Update and improve Notes There are .stderr test wibbles because we get slightly different strictness signatures for an argumment of unlifted type: <L,U> rather than <S,U> for Int# <S,U> rather than <S(S),U(U)> for Int
* Typo fix, replace a foldl with foldl'Ömer Sinan Ağacan2018-12-122-4/+4
|
* testsuite: Mark linkwhole as broken on FreeBSDBen Gamari2018-12-111-0/+1
| | | | See #16035.
* testsuite: Mark keep-cafs and keep-cafs-fail as broken on FreeBSDBen Gamari2018-12-111-1/+3
| | | | See #16035.
* testsuite: Skip T703 on non-Linux platformsBen Gamari2018-12-111-1/+3
| | | | | | | | While the test is in principle applicable to many platforms, the current implementation requires readelf, which we can only assume is present on ELF-based platforms (e.g. Linux). See Trac #703.
* testsuite: Don't use sed -i in T15369Ben Gamari2018-12-111-1/+3
| | | | | BSD sed doesn't allow use of sed -i on symlinks and the source file is symlinked into place.
* testsuite: Ensure that unregisterised function is calledBen Gamari2018-12-116-10/+10
| | | | | Strangely the previous formulation works locally and under CircleCI but fails on another machine. Odd.
* Enable rebindable fail with overloaded stringsShayne Fletcher2018-12-118-33/+115
| | | | | | | | | | | | | | Summary: enable rebindable fail with overloaded strings Reviewers: bgamari, simonpj Reviewed By: bgamari, simonpj Subscribers: simonpj, ndmitchell, rwbarton, carter GHC Trac Issues: #15645 Differential Revision: https://phabricator.haskell.org/D5251
* Explicitly pass -fno-PIC to C compiler on linuxZejun Wu2018-12-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent gcc on some linux ditributions may have -fPIC on by default ``` $ uname -a Linux watashi-arch32 4.18.5-arch1-1.0-ARCH #1 SMP PREEMPT Tue Aug 28 20:45:30 CEST 2018 i686 GNU/Linux $ gcc --version gcc (GCC) 7.3.1 20180312 $ touch dummy.c $ gcc -Q -v dummy.c 2>&1 | grep PIC options enabled: -fPIC -fPIE -faggressive-loop-optimizations ``` This results in following error for i686: ``` $ TEST=T13366 make test ... c-iserv.bin: /home/watashi/github/ghc/libraries/ghc-prim/dist-install/build/HSghc-pri m-0.5.3.o: unknown symbol `_GLOBAL_OFFSET_TABLE_' ghc-stage2: unable to load package `ghc-prim-0.5.3' ... ``` As our runtime linker doesn't support R_386_GOTPC relocations at all (#15847). Also while we don't have such problem on x86_64, it's not desired to build PIC objects either. Test Plan: `TEST=T13366 make test` passed on {rGHC82a716431cc680392e332bc2b1a1fd0d7faa4cd8} Reviewers: simonmar, bgamari, austin Reviewed By: simonmar Subscribers: rwbarton, carter GHC Trac Issues: #15848 Differential Revision: https://phabricator.haskell.org/D5288
* testsuite: Add tests for #15270Ben Gamari2018-12-115-0/+28
| | | | | | | | | | Reviewers: alpmestan Reviewed By: alpmestan Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5216
* Support generating HIE filesAlec Theriault2018-12-1155-57/+7667
| | | | | | | | | | | | | | | | | | | | Adds a `-fenable-ide-info` flag which instructs GHC to generate `.hie` files (see the wiki page: https://ghc.haskell.org/trac/ghc/wiki/HIEFiles). This is a rebased version of Zubin Duggal's (@wz1000) GHC changes for his GSOC project, as posted here: https://gist.github.com/wz1000/5ed4ddd0d3e96d6bc75e095cef95363d. Test Plan: ./validate Reviewers: bgamari, gershomb, nomeata, alanz, sjakobi Reviewed By: alanz, sjakobi Subscribers: alanz, hvr, sjakobi, rwbarton, wz1000, carter Differential Revision: https://phabricator.haskell.org/D5239
* RTS linker: don't crash early when not finding extra-librariesKyrill Briantsev2018-12-113-9/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allow GHCi to not crash when no assumed DLL is found in the standard location. E.g. when loading the package built "dyn" way, we may well have the package's DLL around, and it's the system linker which loads necessary dependencies. Why does this (partially) fix #11042? It's because we often (and when having packages built `dyn` way -- almost always) don't need to load anything recorded in the `extra-libraries` stanza, since if the package DLL exists, GHCi linker simply calls the system linker (via `dlopen`/ `LoadLibrary` APIs) to load it and doesn't bother to load package prelinked object file (if any) or package static library. Thus, all "regular" (with no fancy low-level package content manipulation) packages built "dyn" way should be OK after this fix. Reviewers: hvr, bgamari, int-index Reviewed By: bgamari, int-index Subscribers: Phyx, int-index, rwbarton, carter GHC Trac Issues: #11042 Differential Revision: https://phabricator.haskell.org/D5170
* dmdAnal: Move handling of datacon strictness to mkWWstr_oneBen Gamari2018-12-112-59/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously datacon strictness was accounted for when we demand analysed a case analysis. However, this results in pessimistic demands in some cases. For instance, consider the program (from T10482) data family Bar a data instance Bar (a, b) = BarPair !(Bar a) !(Bar b) newtype instance Bar Int = Bar Int foo :: Bar ((Int, Int), Int) -> Int -> Int foo f k = case f of BarPair x y -> case burble of True -> case x of BarPair p q -> ... False -> ... We really should be able to assume that `p` is already evaluated since it came from a strict field of BarPair. However, as written the demand analyser can not conclude this since we may end up in the False branch of the case on `burble` (which places no demand on `x`). By accounting for the data con strictness later, applied to the demand of the RHS, we get the strict demand signature we want. See Note [Add demands for strict constructors] for a more comprehensive discussion. Test Plan: Validate Reviewers: simonpj, osa1, goldfire Subscribers: rwbarton, carter GHC Trac Issues: #15696 Differential Revision: https://phabricator.haskell.org/D5226
* PPC NCG: Generate MO_?_QuotRem for subword sizesPeter Trommler2018-12-112-43/+37
| | | | | | | | | | | | | | | Handle Int*QuotRemOP and Word*QuotRemOp in PPC NCG. Refactor common code with remainder operation. Test Plan: validate (I validated on Linux powerpc64le and x86_64) Reviewers: erikd, hvr, bgamari, simonmar Reviewed By: bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5323
* Support registering Plugins through the GHC APIDaniel Gröber2018-12-1111-36/+178
| | | | | | | | | | | | | | | | | This allows tooling using the GHC API to use plugins internally. Hopefully this will make it possible to decouple the development of useful plugins from (currently) kitchen-sink type tooling projects such as ghc-mod or HIE -- at least to some extent. Test Plan: validate Reviewers: bgamari, mpickering Subscribers: mpickering, alanz, rwbarton, carter GHC Trac Issues: #15826 Differential Revision: https://phabricator.haskell.org/D5278
* PPC NCG: Implement MachOps for smaller sizesPeter Trommler2018-12-111-161/+146
| | | | | | | | | | | | | | | | | Generate code for MachOps with smaller than wordsize data. Refactor conversion MachOps. Fixes #15854 Test Plan: validate (I validated on powerpc64le and x86_64 Linux) Reviewers: bgamari, hvr, erikd, simonmar Subscribers: rwbarton, carter GHC Trac Issues: #15854 Differential Revision: https://phabricator.haskell.org/D5300
* Misleading msg with qualified imports "No module named X imported"Roland Senn2018-12-114-22/+34
| | | | | | | | | | | | | | | | | | | | To check whether a given module has been imported, we do the following: From the list of all qualified names we extract the distinct module names to a list of module names. Then we check whether the given module name is in this list of module names. Test Plan: make test TEST=T14225 Reviewers: mpickering, hvr, monoidal, osa1, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #14225 Differential Revision: https://phabricator.haskell.org/D5331
* Do not save performance test results if worktree is dirty.David Eichmann2018-12-112-2/+11
| | | | | | | | | | | | Reviewers: bgamari, tdammers Reviewed By: bgamari, tdammers Subscribers: rwbarton, carter GHC Trac Issues: #15924 Differential Revision: https://phabricator.haskell.org/D5368
* Fix recompilation bug with default class methods (#15970)Simon Marlow2018-12-117-13/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a module uses a class, then it can instantiate the class and thereby use its default methods, so we must include the default methods when calculating the fingerprint for the class. Test Plan: New unit test: driver/T15970 Before: ``` =====> T15970(normal) 1 of 1 [0, 0, 0] cd "T15970.run" && $MAKE -s --no-print-directory T15970 Wrong exit code for T15970()(expected 0 , actual 2 ) Stdout ( T15970 ): Makefile:13: recipe for target 'T15970' failed Stderr ( T15970 ): C.o:function Main_zdfTypeClassMyDataType1_info: error: undefined reference to 'A_toTypedData2_closure' C.o:function Main_main1_info: error: undefined reference to 'A_toTypedData2_closure' C.o(.data+0x298): error: undefined reference to 'A_toTypedData2_closure' C.o(.data+0x480): error: undefined reference to 'A_toTypedData2_closure' collect2: error: ld returned 1 exit status `gcc' failed in phase `Linker'. (Exit code: 1) ``` After: test passes. Reviewers: bgamari, simonpj, erikd, watashi, afarmer Subscribers: rwbarton, carter GHC Trac Issues: #15970 Differential Revision: https://phabricator.haskell.org/D5394
* Fix uninformative hp2ps error when the cmdline contains double quotesZejun Wu2018-12-116-28/+63
| | | | | | | | | | | | | | | | | | | | | | | Reapply D5346 with fix incompatible shell quoting in tests. It seems like `$'string'` is not recognized under all test environments, so let's avoid it in tests. Test Plan: ``` hp2ps: "T15904".hp, line 2: integer must follow identifier ``` use new ghc and hp2ps to profile a simple program. Reviewers: simonmar, bgamari, erikd, tdammers Reviewed By: bgamari Subscribers: tdammers, carter, rwbarton GHC Trac Issues: #15904 Differential Revision: https://phabricator.haskell.org/D5388
* cosmetic change: expandtab in utils/hp2ps/HpFile.cZejun Wu2018-12-111-202/+202
| | | | | | | | | | | | | | | | | rGHCbba2b9bf2d69700dc114118658507aaac34c5e62 expand tabs in utils/hp2ps/HpFile.c with tabwidth 2, but the code was written as tabwidth 8. This change simply retabs the code with tabwidth 8 and removes trailing spaces. Test Plan: Tested in stacked diff: {D5388} Reviewers: simonmar, bgamari, afarmer, tdammers Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5407
* circleci: ignore gitlab branches for all jobs in the validate workflowAlp Mestanogullari2018-12-111-13/+26
| | | | | | | | | | | | | | | | Our previous attempt ended up breaking the CircleCI config, but this one has been tested, see: https://circleci.com/gh/ghc/ghc/tree/alp%2Fcircleci%2Fignore-gitlab-branches which shows the builds getting triggered correctly. I also pushed the same branch under 'gitlab/alp/test', and that didn't trigger any build, as desired. Reviewers: bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5429
* Hadrian: ability to run a subset of the testsuiteAlp Mestanogullari2018-12-114-15/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was supposed to be working already but didn't work when we specified several tests with --only. This patch not only fixes this but also makes it possible to specify a subset of tests to run with the TEST environment variable, like the make build system. Here are some examples: hadrian/build.sh test --only=plugins01 hadrian/build.sh test --only="plugins01 plugins02" TEST="plugins01 plugins02" hadrian/build.sh test TEST=plugins03 hadrian/build.sh test --only="plugins01 plugins02" When both the TEST environment variable and the --only flag are used, we simply concatenate the list of tests from both sources and ask the testsuite driver to run them all. This patch addresses #16026. Test Plan: hadrian/build.sh test --only="plugins01 plugins02" Reviewers: bgamari, snowleopard Reviewed By: bgamari, snowleopard Subscribers: rwbarton, carter GHC Trac Issues: #16026 Differential Revision: https://phabricator.haskell.org/D5431
* Hadrian: simple targets for building libraries and executablesAlp Mestanogullari2018-12-114-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces (phony) build targets of the form (1) stage<N>:<lib>:<name> (e.g: stage1:lib:Cabal) (2) stage<N>:<exe>:<name> (e.g: stage2:exe:ghc-bin) where (1) builds the given library with the stage N compiler and (2) builds the given executable with the stage N-1 compiler. This patch may be generating too many such targets but it's a first stab that we can refine. This fixes #15949. Test Plan: hadrian/build.sh stage1:exe:ghc-bin Reviewers: bgamari, snowleopard Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15949 Differential Revision: https://phabricator.haskell.org/D5434
* configure: Don't use ln -vBen Gamari2018-12-111-5/+5
| | | | | | | | | | | | | | | | | | | There's no reason why we need to print the linked files and apparently ln on OpenBSD doesn't support -v. Fixes #15946. Test Plan: Validate Reviewers: monoidal Reviewed By: monoidal Subscribers: rwbarton, erikd, carter GHC Trac Issues: #15946 Differential Revision: https://phabricator.haskell.org/D5425
* Add +RTS -F to the --help outputSimon Marlow2018-12-111-0/+2
| | | | | | | | | | | | Test Plan: `./inplace/bin/ghc-stage2 +RTS --help" Reviewers: bgamari, sgraf, erikd Reviewed By: sgraf Subscribers: adamse, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5428
* Revert dynamically linking ghc.David Eichmann2018-12-113-12/+21
| | | | | | | | | | | | | | | | | | | | | | Building a dynamically linked ghc is broken do to incorrectly building and installing libffi. This disables building a dynamically linked ghc and ghc-iserv-dyn while keeping most of the code in the relevant commits: 79d5427e1 and 89fa34ecd Test Plan: Ensure build environment does NOT have a system libffi installed (you may want to use a nix environment). Then `hadrian/build.sh -c --flavour=default`. Reviewers: bgamari, alpmestan Reviewed By: alpmestan Subscribers: rwbarton, carter GHC Trac Issues: #15837 Differential Revision: https://phabricator.haskell.org/D5430
* circleci: Add integer-simple build targetBen Gamari2018-12-112-1/+28
| | | | Fixes #15915.
* testsuite: Mark tickets identified in #15467 as brokenBen Gamari2018-12-115-5/+13
|
* rts: Disable fallthrough attribute when compiling with ClangBen Gamari2018-12-111-1/+5
| | | | | | Apparently clang doesn't enable implicitly fallthrough warnings by default http://llvm.org/viewvc/llvm-project?revision=167655&view=revision when compiling C and the attribute cause warnings of their own (#16019).
* utils/gen-dll: Bump containers upper boundBen Gamari2018-12-111-1/+1
| | | | Fixes #16023.
* CircleCI: Add configurations for Centos 7 and Debian 9Ben Gamari2018-12-118-59/+228
|