summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Make tcIfaceCompleteMatch lazier.Zubin Duggal2021-05-256-2/+40
| | | | | Insufficient lazyness causes a loop while typechecking COMPLETE pragmas from interfaces (#19744).
* Refactor driver code; de-duplicate and split APIs (#14095, !5555)Divam2021-05-259-367/+368
| | | | | | | | | | | | | | | | | This commit does some de-duplication of logic between the one-shot and --make modes, and splitting of some of the APIs so that its easier to do the fine-grained parallelism implementation. This is the first part of the implementation plan as described in #14095 * compileOne now uses the runPhase pipeline for most of the work. The Interpreter backend handling has been moved to the runPhase. * hscIncrementalCompile has been broken down into multiple APIs. * haddock submodule bump: Rename of variables in html-test ref: This is caused by a change in ModDetails in case of NoBackend. Now the initModDetails is used to recreate the ModDetails from interface and in-memory ModDetails is not used.
* docs: Fix example in toIntegralSizedMatthew Pickering2021-05-241-3/+3
| | | | | | Thanks to Mathnerd3141 for the fixed example. Fixes #19880
* check-{ppr/exact}: Rewrite more directly to just parse filesMatthew Pickering2021-05-2411-265/+34
| | | | | | There was quite a large amount of indirection in these tests, so I have rewritten them to just directly parse the files rather than making a module graph and entering other twisty packages.
* Move warning flag handling into Flags moduleSylvain Henry2021-05-243-277/+407
| | | | | | | | | | | I need this to make the Logger independent of DynFlags. Also fix copy-paste errors: Opt_WarnNonCanonicalMonadInstances was associated to "noncanonical-monadfail-instances" (MonadFailInstances vs MonadInstances). In the process I've also made the default name for each flag more explicit.
* Add regression test for #9985nineonine2021-05-242-3/+33
|
* HsToken for HsPar, ParPat, HsCmdPar (#19523)Vladislav Zavialov2021-05-2334-152/+254
| | | | This patch is a first step towards a simpler design for exact printing.
* Introduce Strict.Maybe, Strict.Pair (#19156)Vladislav Zavialov2021-05-2321-78/+178
| | | | | | | | | | | | | This patch fixes a space leak related to the use of Maybe in RealSrcSpan by introducing a strict variant of Maybe. In addition to that, it also introduces a strict pair and uses the newly introduced strict data types in a few other places (e.g. the lexer/parser state) to reduce allocations. Includes a regression test.
* Pre-add test case for #19156Vladislav Zavialov2021-05-233-0/+37
|
* EPA: AnnAt missing for type application in patternsAlan Zimmerman2021-05-239-15/+41
| | | | | | | | | | Ensure that the exact print annotations accurately record the `@` for code like tyApp :: Con k a -> Proxy a tyApp (Con @kx @ax (x :: Proxy ax)) = x :: Proxy (ax :: kx) Closes #19850
* Change representation of field selector occurencesShayne Fletcher2021-05-2348-474/+350
| | | | | | | | | | | | - Change the names of the fields in in `data FieldOcc` - Renames `HsRecFld` to `HsRecSel` - Replace `AmbiguousFieldOcc p` in `HsRecSel` with `FieldOcc p` - Contains a haddock submodule update The primary motivation of this change is to remove `AmbiguousFieldOcc`. This is one of a suite of changes improving how record syntax (most notably record update syntax) is represented in the AST.
* Add regression test for #19287nineonine2021-05-223-0/+17
|
* Support NetBSD/aarch64 via LLVM codegenPHO2021-05-223-0/+12
| | | | Only adding "aarch64-unknown-netbsd" to gen-data-layout.sh was sufficient to get it working. No other changes were strictly required.
* Remove ANN pragmas in check-ppr and check-exactMatthew Pickering2021-05-222-6/+0
| | | | | | | | | | | | | This fixes the `devel2+werror` build combo as stage1 does not have TH enabled. ``` utils/check-exact/Preprocess.hs:51:1: error: [-Werror] Ignoring ANN annotations, because this is a stage-1 compiler without -fexternal-interpreter or doesn't support GHCi | 51 | {-# ANN module ("HLint: ignore Reduce duplication" :: String) #-} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ```
* hadrian: Add omit_pragmas transformerMatthew Pickering2021-05-221-0/+8
| | | | | | This transformer builds stage2 GHC with -fomit-interface-pragmas which can greatly reduce the amount of rebuilding but still allows most the tests to pass.
* hadrian: Reorganise modules so KV parser can be used to define transformersMatthew Pickering2021-05-227-273/+288
|
* Remove Maybe from Context in HsQualTyAlan Zimmerman2021-05-2110-47/+46
| | | | | | Updates haddock submodule Closes #19845
* EPA: Fix explicit specificity and unicode linear arrow annotationsAlan Zimmerman2021-05-218-18/+66
| | | | | Closes #19839 Closes #19840
* SysTools: make file copy more efficientSylvain Henry2021-05-213-47/+43
|
* Only run armv7-linux-deb10 build nightlyMatthew Pickering2021-05-211-1/+2
|
* hadrian: Reduce verbosity on failed testsuite runMatthew Pickering2021-05-211-1/+4
| | | | | | | | | | | | | | | When the testsuite failed before it would print a big exception which gave you the very long command line which was used to invoke the testsuite. By capturing the exit code and rethrowing the exception, the error is must less verbose: ``` Error when running Shake build system: at want, called at src/Main.hs:104:30 in main:Main * Depends on: test * Raised the exception: user error (tests failed) ```
* Only suggest names that make sense (#19843)Jakob Brünker2021-05-2139-112/+497
| | | | | | | | | | | | | | | | * Don't show suggestions for similar variables when a data constructor in a pattern is not in scope. * Only suggest record fields when a record field for record creation or updating is not in scope. * Suggest similar record fields when a record field is not in scope with -XOverloadedRecordDot. * Show suggestions for data constructors if a type constructor or type is not in scope, but only if -XDataKinds is enabled. Fixes #19843.
* Bump libffi submodule to libffi-3.3 (#16940)Sylvain Henry2021-05-201-0/+0
|
* Add exports to GHC.Tc.Errors.Hole (fixes #19864)Matthías Páll Gissurarson2021-05-202-107/+153
|
* Add tests for code generation options specified via OPTIONS_GHC in multi ↵Divam2021-05-2013-0/+99
| | | | module compilation
* Extensible Hints for diagnostic messagesAlfredo Di Napoli2021-05-2026-143/+314
| | | | | | | | | | | | | | | | | | This commit extends the GHC diagnostic hierarchy with a `GhcHint` type, modelling helpful suggestions emitted by GHC which can be used to deal with a particular warning or error. As a direct consequence of this, the `Diagnostic` typeclass has been extended with a `diagnosticHints` method, which returns a `[GhcHint]`. This means that now we can clearly separate out the printing of the diagnostic message with the suggested fixes. This is done by extending the `printMessages` function in `GHC.Driver.Errors`. On top of that, the old `PsHint` type has been superseded by the new `GhcHint` type, which de-duplicates some hints in favour of a general `SuggestExtension` constructor that takes a `GHC.LanguageExtensions.Extension`.
* Use pprSigmaType to print GHCi debugger Suspension Terms (Fix #19355)Roland Senn2021-05-208-23/+33
| | | | | | | | In the GHCi debugger use the function `pprSigmaType` to print out Suspension Terms. The function `pprSigmaType` respect the flag `-f(no-)print-explicit-foralls` and so it fixes #19355. Switch back output of existing tests to default mode (no explicit foralls).
* gitlab-ci: Add Alpine job linking against gmp integer backendBen Gamari2021-05-201-3/+13
| | | | As requested by Michael Snoyman.
* Added new regresion test for #18036 from ticket #19865.Baldur Blöndal2021-05-192-0/+34
|
* Remove wired-in names hs-boot check bypass (#19855)Sylvain Henry2021-05-191-3/+0
| | | | The check bypass is no longer necessary and the check would have avoided #19638.
* constant folding: Make shiftRule for Word8/16/32# types return correct typeMatthew Pickering2021-05-193-6/+18
| | | | Fixes #19851
* Make setBndrsDemandInfo work with only type variablesMatthew Pickering2021-05-193-4/+12
| | | | | | Fixes #19849 Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io>
* PPC NCG: Fix unsigned compare with 16-bit constantsPeter Trommler2021-05-192-2/+2
| | | | Fixes #19852 and #19609
* driver: check if clang is the assembler when passing clang specific ↵Adam Sandberg Ericsson2021-05-193-15/+34
| | | | | | | arguments (#19827) Previously we assumed that the assembler was the same as the c compiler, but we allow setting them to different programs with -pgmc and -pgma.
* Changes to HsRecField'Shayne Fletcher2021-05-1927-219/+229
|
* Bignum: bump to version 1.1 (#19846)Sylvain Henry2021-05-192-1/+11
|
* Cmm: fix sinking after suspendThreadSylvain Henry2021-05-1912-21/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suppose a safe call: myCall(x,y,z) It is lowered into three unsafe calls in Cmm: r = suspendThread(...); myCall(x,y,z); resumeThread(r); Consider the following situation for myCall arguments: x = Sp[..] -- stack y = Hp[..] -- heap z = R1 -- global register r = suspendThread(...); myCall(x,y,z); resumeThread(r); The sink pass assumes that unsafe calls clobber memory (heap and stack), hence x and y assignments are not sunk after `suspendThread`. The sink pass also correctly handles global register clobbering for all unsafe calls, except `suspendThread`! `suspendThread` is special because it releases the capability the thread is running on. Hence the sink pass must also take into account global registers that are mapped into memory (in the capability). In the example above, we could get: r = suspendThread(...); z = R1 myCall(x,y,z); resumeThread(r); But this transformation isn't valid if R1 is (BaseReg->rR1) as BaseReg is invalid between suspendThread and resumeThread. This caused argument corruption at least with the C backend ("unregisterised") in #19237. Fix #19237
* Add pattern TypeRep (#19691), exported by Type.Reflection.Baldur Blöndal2021-05-195-5/+90
|
* CPR: Detect constructed products in `runRW#` apps (#19822)Sebastian Graf2021-05-197-27/+75
| | | | | | | | | | | | | | | | | | | | | In #19822, we realised that the Simplifier's new habit of floating cases into `runRW#` continuations inhibits CPR analysis from giving key functions of `text` the CPR property, such as `singleton`. This patch fixes that by anticipating part of !5667 (Nested CPR) to give `runRW#` the proper CPR transformer it now deserves: Namely, `runRW# (\s -> e)` should have the CPR property iff `e` has it. The details are in `Note [Simplification of runRW#]` in GHC.CoreToStg.Prep. The output of T18086 changed a bit: `panic` (which calls `runRW#`) now has `botCpr`. As outlined in Note [Bottom CPR iff Dead-Ending Divergence], that's OK. Fixes #19822. Metric Decrease: T9872d
* testsuite: Don't copy .hi-boot and .o-boot files into temp dirMatthew Pickering2021-05-191-1/+3
|
* Point posters to ghc-proposalsRichard Eisenberg2021-05-191-0/+7
|
* EPA: Remove duplicate annotations from HsDataDefnAlan Zimmerman2021-05-1917-144/+112
| | | | | | | | They are repeated in the surrounding DataDecl and FamEqn. Updates haddock submodule Closes #19834
* Tidy: Ignore rules (more) when -fomit-interface-pragmas is onMatthew Pickering2021-05-191-1/+8
| | | | | | | | | | | Before this commit, the RHS of a rule would expose additional definitions, despite the fact that the rule wouldn't get exposed so it wouldn't be possible to ever use these definitions. The net-result is slightly less recompilation when specialisation introduces rules. Related to #19836
* Fix LitRubbish being applied to values.Andreas Klebinger2021-05-191-12/+14
| | | | This fixes #19824
* hadrian: Build check-ppr and check-exact using normal hadrian rules when in-treeMatthew Pickering2021-05-193-25/+23
| | | | Fixes #19606 #19607
* hadrian: Make copyFileLinked a bit more robustMatthew Pickering2021-05-192-11/+14
| | | | | Previously it only worked if the two files you were trying to symlink were already in the same directory.
* Implement :info for record pattern synonyms (#19462)nineonine2021-05-197-13/+41
|
* Remove transitive information about modules and packages from interface filesMatthew Pickering2021-05-19119-323/+605
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit modifies interface files so that *only* direct information about modules and packages is stored in the interface file. * Only direct module and direct package dependencies are stored in the interface files. * Trusted packages are now stored separately as they need to be checked transitively. * hs-boot files below the compiled module in the home module are stored so that eps_is_boot can be calculated in one-shot mode without loading all interface files in the home package. * The transitive closure of signatures is stored separately This is important for two reasons * Less recompilation is needed, as motivated by #16885, a lot of redundant compilation was triggered when adding new imports deep in the module tree as all the parent interface files had to be redundantly updated. * Checking an interface file is cheaper because you don't have to perform a transitive traversal to check the dependencies are up-to-date. In the code, places where we would have used the transitive closure, we instead compute the necessary transitive closure. The closure is not computed very often, was already happening in checkDependencies, and was already happening in getLinkDeps. Fixes #16885 ------------------------- Metric Decrease: MultiLayerModules T13701 T13719 -------------------------
* Add some TcRn diagnostic messagesAlfredo Di Napoli2021-05-1911-55/+164
| | | | | | | | | | | | | | | | | This commit converts some TcRn diagnostic into proper structured errors. Ported by this commit: * Add TcRnImplicitLift This commit adds the TcRnImplicitLift diagnostic message and a prototype API to be able to log messages which requires additional err info. * Add TcRnUnusedPatternBinds * Add TcRnDodgyExports * Add TcRnDodgyImports message * Add TcRnMissingImportList
* Implement bitwise infix opsKoz Ross2021-05-191-0/+42
|