summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rts: Make event manager wakeup logic ThreadSanitizer-cleanwip/T17090Ben Gamari2019-08-241-7/+13
| | | | See #17090.
* Document types of LitNumbers, minor refactoring in Literal.hsÖmer Sinan Ağacan2019-08-151-10/+28
|
* Cmm: constant folding `quotRem x 2^N`Sylvain Henry2019-08-151-11/+39
| | | | | | `quot` and `rem` are implemented efficiently when the second argument is a constant power of 2. This patch uses the same implementations for `quotRem` primop.
* Make add_info attach unfoldings (#16615)Tobias Dammers2019-08-156-40/+121
|
* Add test cases for #16615Tobias Dammers2019-08-154-0/+43
|
* Remove unused imports of the form 'import foo ()' (Fixes #17065)James Foster2019-08-1535-40/+14
| | | | | | | | | | | These kinds of imports are necessary in some cases such as importing instances of typeclasses or intentionally creating dependencies in the build system, but '-Wunused-imports' can't detect when they are no longer needed. This commit removes the unused ones currently in the code base (not including test files or submodules), with the hope that doing so may increase parallelism in the build system by removing unnecessary dependencies.
* GHCi supports not-necessarily-lifted join pointsRichard Eisenberg2019-08-1410-36/+130
| | | | | | | | | | | | | | | | Fixes #16509. See Note [Not-necessarily-lifted join points] in ByteCodeGen, which tells the full story. This commit also adds some comments and cleans some code in the byte-code generator, as I was exploring around trying to understand it. (This commit removes an old test -- this is really a GHCi problem, not a pattern-synonym problem.) test case: ghci/scripts/T16509
* Use os.devnull instead of '/dev/null' in the testsuite driver.Andreas Klebinger2019-08-141-4/+26
| | | | | | | | | | | | The later caused issues on windows by being translated into "\\dev\\null" and python then trying to open this non-existant file. So we now use os.devnull inside python and convert it to "/dev/null" when calling out to the shell, which is bound to run in a unix like environment. This fixes an issue a test producing unexpected stderr output failed with a framework failure instead of showing a diff of the output.
* Rework the Binary Integer instance.Andreas Klebinger2019-08-141-22/+74
| | | | | | | | | | | | We used to serialise large integers as strings. Now they are serialized as a list of Bytes. This changes the size for a Integer in the higher 64bit range from 77 to 9 bytes when written to disk. The impact on the general case is small (<1% for interface files) as we don't use many Integers. But for code that uses many this should be a nice benefit.
* Fix binary distributionTamar Christina2019-08-131-1/+0
|
* Add Foldable, Traversable instances for Uniq(D)FMSebastian Graf2019-08-132-4/+38
| | | | | The `UniqDFM` is deterministic, of course, while we provide an unsafe `NonDetUniqFM` wrapper for `UniqFM` to opt into nondeterministic instances.
* Reformat comments in StgSynÖmer Sinan Ağacan2019-08-101-158/+141
| | | | | | | This does not make any changes in the contents -- formatting only. Previously the comments were too noisy and I've always found it very hard to read. Hopefully it's easier to read now.
* Add test for #16893Ömer Sinan Ağacan2019-08-103-0/+93
|
* Add timing on loadInterfaceBen Gamari2019-08-101-1/+2
| | | | | AndreasK recently mentioned that he thought that interface file loading may be a non-trivial cost. Let's measure.
* Consolidate `TablesNextToCode` and `GhcUnreigsterised` in configure (#15548)Joachim Breitner2019-08-1013-43/+78
| | | | | | | | | | | | | | | | | | | | `TablesNextToCode` is now a substituted by configure, where it has the correct defaults and error handling. Nowhere else needs to duplicate that, though we may want the compiler to to guard against bogus settings files. I renamed it from `GhcEnableTablesNextToCode` to `TablesNextToCode` to: - Help me guard against any unfixed usages - Remove any lingering connotation that this flag needs to be combined with `GhcUnreigsterised`. Original reviewers: Original subscribers: TerrorJack, rwbarton, carter Original Differential Revision: https://phabricator.haskell.org/D5082
* Revert "Make scanr a good producer and consumer"Ben Gamari2019-08-072-18/+2
| | | | | | This reverts commit 4e1dfc3767167dddd0e151a2df8305b12aa0f49c. Due to #16943.
* testsuite: Add tests for #16943Ben Gamari2019-08-075-0/+23
|
* Fix bug preventing information about patterns from being serialized in .hie ↵Zubin Duggal2019-08-0711-18/+159
| | | | files
* Fix testmniip2019-08-071-1/+1
|
* Fix documentationmniip2019-08-071-2/+2
|
* Explicitly number equations when printing axiom incompatibilitiesmniip2019-08-073-26/+32
|
* Fix testmniip2019-08-071-9/+7
|
* Add a -fprint-axiom-incomps option (#15546)mniip2019-08-078-25/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | Supply branch incomps when building an IfaceClosedSynFamilyTyCon `pprTyThing` now has access to incomps. This also causes them to be written out to .hi files, but that doesn't pose an issue other than a more faithful bijection between `tyThingToIfaceDecl` and `tcIfaceDecl`. The machinery for displaying axiom incomps was already present but not in use. Since this is now a thing that pops up in ghci's :info the format was modified to look like a haskell comment. Documentation and a test for the new feature included. Test Plan: T15546 Reviewers: simonpj, bgamari, goldfire Reviewed By: simonpj Subscribers: rwbarton, carter GHC Trac Issues: #15546 Differential Revision: https://phabricator.haskell.org/D5097
* Introduce a type for "platform word size", use it instead of IntÖmer Sinan Ağacan2019-08-0611-60/+86
| | | | | | | | We introduce a PlatformWordSize type and use it in platformWordSize field. This removes to panic/error calls called when platform word size is not 32 or 64. We now check for this when reading the platform config.
* Remove old/broken(?) .ghci scriptMatthew Pickering2019-08-061-11/+0
| | | | | | | | | I was attempting to load hadrian into ghci by using `cabal new-repl exe:hadrian` but it failed because it tried to use this `.ghci` configuration. I'm not sure who used this script but you should really use the new-repl method.
* hadrian: Refactor file patterns for future Shake changes (fixes #17005)James Foster2019-08-0616-120/+120
| | | | | | | | | | | | | | | | | Shake will be moving from its current implementation of ?== to one from System.FilePattern. Support for `//` is being dropped, leaving only `*` and `**` as special forms. This commit converts the existing file patterns in Hadrian to the new format. It also removes all occurances of <//> and changes the user-settings docs to remove references to // and add **. The conversion is as follows: - //a ==> **/a - a// ==> a/** - a//b ==> a/**/b
* Remove dead parameter from coreToStgAppSimon Peyton Jones2019-08-061-15/+8
|
* testsuite: Rework tracking of fragile testsBen Gamari2019-08-043-7/+18
| | | | | Breaks fragile tests into two groups, allowing us to easily preserve stdout/stderr of failing fragile tests.
* configure: Search for LLVM executables with two-number versionsBen Gamari2019-08-041-2/+3
| | | | | | | Fedora uses the naming llc-7.0 while Debian uses llc-7. Ensure that both are found. Fixes #16990.
* testsuite: Add testsuite for #16978Ben Gamari2019-08-042-0/+30
|
* Don't float unlifted join points to top levelSimon Peyton Jones2019-08-041-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ticket #16978 showed that we were floating a recursive, unlifted join point to top level. It's very much a corner case: joinrec j :: Int# j = jump j in ... But somehow it showed up in a real program. For non-recursive bindings in SetLevels.lvlBind we were already (correctly) checking for unlifted bindings, but when I wrote that code I didn't think that a /recursive/ binding could be unlifted but /join-points/ can be! Actually I don't think that SetLevels should be floating join points at all. SetLevels really floats things to move stuff out of loops and save allocation; but none of that applies to join points. The only reason to float join points is in cases like join j1 x = join j2 y = ... in ... which we might want to swizzle to join j2 x y = ... in join j1 x = ... in ... because now j1 looks small and might be inlined away altogether. But this is a very local float perhaps better done in the simplifier. Still: this patch fixes the crash, and does so in a way that is harmless if/when we change our strategy for floating join points.
* Update .gitignoreMatthew Pickering2019-08-041-1/+11
| | | | Add some files generated by hadrian and some tooling files
* gitlab-ci: Manually set SPHINXBUILD on WindowsBen Gamari2019-08-041-0/+1
| | | | | | | For some reason configure seems unable to find it on its own. Let's try giving it a hint. Addresses #16398.
* Hadrian: make settings, platformConstants, etc dependencies of lib:ghcAlp Mestanogullari2019-08-024-18/+19
| | | | | | | | | | | This fixes #17003, where a user directly asked for the 'docs-haddock' target without building a complete stage 2 GHC first. Since haddock only depends on lib:ghc, the stage 2 GHC executable wasn't built, and neither were the settings, platformConstants, llvm-passes and llvm-targets files, since they are declared to be dependencies of exe:ghc. This makes sense in general since all GHC API users (haddock is one) will likely want those files to be there.
* Packages: Add timing for package database initializationBen Gamari2019-08-021-2/+7
|
* rts: Always truncate output filesBen Gamari2019-08-025-6/+6
| | | | | | | | | Previously there were numerous places in the RTS where we would fopen with the "w" flag string. This is wrong as it will not truncate the file. Consequently if we write less data than the previous length of the file we will leave garbage at its end. Fixes #16993.
* Add Note [withTiming] in compiler/main/ErrUtils.hsAlp Mestanogullari2019-08-021-0/+95
|
* compiler: emit finer grained codegen events to eventlogAlp Mestanogullari2019-08-025-48/+64
|
* docs: fixs -prof links in rts-flags sectionAdam Sandberg Eriksson2019-08-021-7/+6
|
* Remove build.nix.shKrzysztof Gogolewski2019-08-021-34/+0
| | | | | This file refers to shell.nix, which was removed in 430e6fedfda and c00d2f59d.
* Use injectiveVarsOfType to catch dodgy type family instance binders (#17008)Ryan Scott2019-08-028-90/+216
| | | | | | | | | | | | | | | | Previously, we detected dodgy type family instances binders by expanding type synonyms (via `exactTyCoVarsOfType`) and looking for type variables on the RHS that weren't mentioned on the (expanded) LHS. But this doesn't account for type families (like the example in #17008), so we instead use `injectiveVarsOfType` to only count LHS type variables that are in injective positions. That way, the `a` in `type instance F (x :: T a) = a` will not count if `T` is a type synonym _or_ a type family. Along the way, I moved `exactTyCoVarsOfType` to `TyCoFVs` to live alongside its sibling functions that also compute free variables. Fixes #17008.
* Rip out 9-year-old pattern variable hack (#17007)Ryan Scott2019-08-024-37/+23
| | | | | | | | | | | | | | | | | | GHC had an ad hoc validity check in place to rule out pattern variables bound by type synonyms, such as in the following example: ```hs type ItemColID a b = Int -- Discards a,b get :: ItemColID a b -> ItemColID a b get (x :: ItemColID a b) = x :: ItemColID a b ``` This hack is wholly unnecessary nowadays, since OutsideIn(X) is more than capable of instantiating `a` and `b` to `Any`. In light of this, let's rip out this validity check. Fixes #17007.
* Add StandaloneDeriving example for DerivingVia.Andreas Klebinger2019-08-021-0/+6
| | | | [skip-ci]
* Fix T16916 CI failures (#16966)Ivan Kasatenko2019-08-011-4/+8
| | | | | | | | | 1. Slightly increased the waiting time for the tested effect to be more profound. 2. Introduced measuring of the actual time spent waiting and adjusing CPU time by it to compensate for threadDelay waiting time inconsistencies.
* gitlab-ci: Fix it after upgradeBen Gamari2019-07-311-2/+2
| | | | | It seems that the regular expression parser changed in GitLab 12.1 and now does now support forward slashes in the RE, even when escaped.
* Work around redundant import issueBen Gamari2019-07-311-1/+1
| | | | | | | As mentioned in #16997, GHC currently complains about this import. In general I'm reluctant to paper over things like this but in the case of an hs-boot file I think adding an import list is the right thing to do regardless of the bug.
* Move tyConAppNeedsKindSig to TypeBen Gamari2019-07-314-276/+270
| | | | | Previously it was awkwardly in TyCoFVs (and before that in TyCoRep). Type seems like a sensible place for it to live.
* gitignore: Add .mypy_cacheBen Gamari2019-07-311-0/+1
|
* Break up TyCoRepBen Gamari2019-07-3129-2522/+2658
| | | | | | | | | | | | | | | | | | | | | | | | | | This breaks up the monstrous TyCoReps module into several new modules by topic: * TyCoRep: Contains the `Coercion`, `Type`, and related type definitions and a few simple predicates but nothing further * TyCoPpr: Contains the the pretty-printer logic * TyCoFVs: Contains the free variable computations (and `tyConAppNeedsKindSig`, although I suspect this should change) * TyCoSubst: Contains the substitution logic for types and coercions * TyCoTidy: Contains the tidying logic for types While we are able to eliminate a good number of `SOURCE` imports (and make a few others smaller) with this change, we must introduce one new `hs-boot` file for `TyCoPpr` so that `TyCoRep` can define `Outputable` instances for the types it defines. Metric Increase: haddock.Cabal haddock.compiler
* Apply a missing substitution in mkEtaWW (#16979)Simon Peyton Jones2019-07-304-8/+287
| | | | | | | | | | The `mkEtaWW` case for newtypes forgot to apply the substitution to the newtype coercion, resulting in the Core Lint errors observed in #16979. Easily fixed. Fixes #16979. Co-authored-by: Ryan Scott <ryan.gl.scott@gmail.com>