summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-16tcSkolemiseTypewip/rae-aug06Richard Eisenberg
This function compiles, but is otherwise untested. This commit also removes the unused checkTvConstraints.
2019-08-16Fix Note [Kind-checking tyvar binders for associated types]Richard Eisenberg
2019-08-16Add comment about solveEqualitiesRichard Eisenberg
2019-08-16Document types of LitNumbers, minor refactoring in Literal.hsÖmer Sinan Ağacan
2019-08-16Cmm: constant folding `quotRem x 2^N`Sylvain Henry
`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.
2019-08-16Make add_info attach unfoldings (#16615)Tobias Dammers
2019-08-16Add test cases for #16615Tobias Dammers
2019-08-15Remove unused imports of the form 'import foo ()' (Fixes #17065)James Foster
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.
2019-08-14GHCi supports not-necessarily-lifted join pointsRichard Eisenberg
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
2019-08-14Use os.devnull instead of '/dev/null' in the testsuite driver.Andreas Klebinger
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.
2019-08-14Rework the Binary Integer instance.Andreas Klebinger
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.
2019-08-13Fix binary distributionTamar Christina
2019-08-13Add Foldable, Traversable instances for Uniq(D)FMSebastian Graf
The `UniqDFM` is deterministic, of course, while we provide an unsafe `NonDetUniqFM` wrapper for `UniqFM` to opt into nondeterministic instances.
2019-08-10Reformat comments in StgSynÖmer Sinan Ağacan
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.
2019-08-10Add test for #16893Ömer Sinan Ağacan
2019-08-10Add timing on loadInterfaceBen Gamari
AndreasK recently mentioned that he thought that interface file loading may be a non-trivial cost. Let's measure.
2019-08-10Consolidate `TablesNextToCode` and `GhcUnreigsterised` in configure (#15548)Joachim Breitner
`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
2019-08-07Revert "Make scanr a good producer and consumer"Ben Gamari
This reverts commit 4e1dfc3767167dddd0e151a2df8305b12aa0f49c. Due to #16943.
2019-08-07testsuite: Add tests for #16943Ben Gamari
2019-08-07Fix bug preventing information about patterns from being serialized in .hie ↵Zubin Duggal
files
2019-08-07Fix testmniip
2019-08-07Fix documentationmniip
2019-08-07Explicitly number equations when printing axiom incompatibilitiesmniip
2019-08-07Fix testmniip
2019-08-07Add a -fprint-axiom-incomps option (#15546)mniip
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
2019-08-07Introduce a type for "platform word size", use it instead of IntÖmer Sinan Ağacan
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.
2019-08-07Remove old/broken(?) .ghci scriptMatthew Pickering
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.
2019-08-07hadrian: Refactor file patterns for future Shake changes (fixes #17005)James Foster
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
2019-08-07Remove dead parameter from coreToStgAppSimon Peyton Jones
2019-08-04testsuite: Rework tracking of fragile testsBen Gamari
Breaks fragile tests into two groups, allowing us to easily preserve stdout/stderr of failing fragile tests.
2019-08-04configure: Search for LLVM executables with two-number versionsBen Gamari
Fedora uses the naming llc-7.0 while Debian uses llc-7. Ensure that both are found. Fixes #16990.
2019-08-04testsuite: Add testsuite for #16978Ben Gamari
2019-08-04Don't float unlifted join points to top levelSimon Peyton Jones
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.
2019-08-04Update .gitignoreMatthew Pickering
Add some files generated by hadrian and some tooling files
2019-08-04gitlab-ci: Manually set SPHINXBUILD on WindowsBen Gamari
For some reason configure seems unable to find it on its own. Let's try giving it a hint. Addresses #16398.
2019-08-03Hadrian: make settings, platformConstants, etc dependencies of lib:ghcAlp Mestanogullari
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.
2019-08-03Packages: Add timing for package database initializationBen Gamari
2019-08-03rts: Always truncate output filesBen Gamari
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.
2019-08-03Add Note [withTiming] in compiler/main/ErrUtils.hsAlp Mestanogullari
2019-08-03compiler: emit finer grained codegen events to eventlogAlp Mestanogullari
2019-08-02docs: fixs -prof links in rts-flags sectionAdam Sandberg Eriksson
2019-08-02Remove build.nix.shKrzysztof Gogolewski
This file refers to shell.nix, which was removed in 430e6fedfda and c00d2f59d.
2019-08-02Use injectiveVarsOfType to catch dodgy type family instance binders (#17008)Ryan Scott
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.
2019-08-02Rip out 9-year-old pattern variable hack (#17007)Ryan Scott
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.
2019-08-02Add StandaloneDeriving example for DerivingVia.Andreas Klebinger
[skip-ci]
2019-08-01Fix T16916 CI failures (#16966)Ivan Kasatenko
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.
2019-07-31gitlab-ci: Fix it after upgradeBen Gamari
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.
2019-07-31Work around redundant import issueBen Gamari
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.
2019-07-31Move tyConAppNeedsKindSig to TypeBen Gamari
Previously it was awkwardly in TyCoFVs (and before that in TyCoRep). Type seems like a sensible place for it to live.
2019-07-31gitignore: Add .mypy_cacheBen Gamari