summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fail before checking instances in checkHsigIface if exports don't match (#19244)wip/T19244-fixZubin Duggal2021-05-307-2/+103
|
* Rip GHC.Tc.Solver.Monad asunder (only)Richard Eisenberg2021-05-2914-1926/+2031
| | | | | | | | | | | This creates new modules GHC.Tc.Solver.InertSet and GHC.Tc.Solver.Types. The Monad module is still pretty big, but this is an improvement. Moreover, it means that GHC.HsToCore.Pmc.Solver.Types no longer depends on the constraint solver (it now depends on GHC.Tc.Solver.InertSet), making the error-messages work easier. This patch thus contributes to #18516.
* Fix and slight improvement to datacon worker/wrapper notesSylvain Henry2021-05-292-2/+5
|
* Bignum: match on DataCon workers in rules (#19892)Sylvain Henry2021-05-296-12/+59
| | | | | | | | | We need to match on DataCon workers for the rules to be triggered. T13701 ghc/alloc decreases by ~2.5% on some archs Metric Decrease: T13701
* Fix Note [Positioning of forkM]Zubin Duggal2021-05-291-5/+4
|
* ghci: Enable -fkeep-going by defaultMatthew Pickering2021-05-299-5/+19
| | | | | | | | | | | This also demotes the error message about -fkeep-going to a trace message which matches the behaviour of other build systems (such as cabal-install and nix) which don't print any message like this on a failure. We want to remove the stable module check in a future patch, which is an approximation of `-fkeep-going`. At the moment this change shouldn't do very much.
* sighparsonsmatt2021-05-291-1/+1
|
* Apply 2 suggestion(s) to 1 file(s)parsonsmatt2021-05-291-2/+2
|
* Address review comments, export from THparsonsmatt2021-05-293-1/+8
|
* Add `newDeclarationGroup` and provide documentation in reifyInstances and ↵parsonsmatt2021-05-291-0/+62
| | | | isInstance
* Work around LLVM backend overlapping register limitationsLuite Stegeman2021-05-299-165/+136
| | | | | | | | The stg_ctoi_t and stg_ret_t procedures which convert unboxed tuples between the bytecode an native calling convention were causing a panic when using the LLVM backend. Fixes #19591
* Add -Wmissing-exported-pattern-synonym-signaturesThomas Winant2021-05-2919-352/+255
| | | | | | | | | | | | | After !4741, it was no longer possible to silence a warning about a missing pattern synonym signature if the `-Wmissing-signatures` flag was on. Restore the previous semantics while still adhering to the principle "enabling an additional warning flag should never make prior warnings disappear". For more symmetry and granularity, introduce `-Wmissing-exported-pattern-synonym-signatures`. See Note [Missing signatures] for an overview of all flags involved.
* Use quotRemWord in showWordSylvain Henry2021-05-281-3/+5
| | | | | | | | | | | | | | | | | | Using the following high-quality benchmark (with -O2): main :: IO () main = do let go 0 = "" go n@(W# n#) = showWord n# (go (n -1)) print $ length (go 10000000) I get the following performance results: - remWord+quotRem: 0,76s user 0,00s system 99% cpu 0,762 total - quotRemWord: 0,45s user 0,01s system 99% cpu 0,456 total Note that showSignedInt already uses quotRemInt.
* Document release when TypeApplications allowed declaring variables as inferredBoris Lykah2021-05-281-2/+3
|
* [EPA] exact print linear arrows.Alan Zimmerman2021-05-276-13/+91
| | | | | | | | Closes #19903 Note: the normal ppr does not reproduce unicode linear arrows, so that part of the normal printing test is ommented out in the Makefile for this test. See #18846
* Improve deriveConstants error message.Andreas Klebinger2021-05-271-1/+2
| | | | This fixes #19823
* Change representation of HsGetField and HsProjectionShayne Fletcher2021-05-279-68/+74
| | | | | Another change in a series improving record syntax in the AST. The key change in this commit is the renaming of `HsFieldLabel` to `DotFieldOcc`.
* Enable strict dicts by default at -O2.Andreas Klebinger2021-05-277-39/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the common case this is a straight performance win at a compile time cost so we enable it at -O2. In rare cases it can lead to compile time regressions because of changed inlining behaviour. Which can very rarely also affect runtime performance. Increasing the inlining threshold can help to avoid this which is documented in the user guide. In terms of measured results this reduced instructions executed for nofib by 1%. However for some cases (e.g. Cabal) enabling this by default increases compile time by 2-3% so we enable it only at -O2 where it's clear that a user is willing to trade compile time for runtime. Most of the testsuite runs without -O2 so there are few perf changes. Increases: T12545/T18698: We perform more WW work because dicts are now treated strict. T9198: Also some more work because functions are now subject to W/W Decreases: T14697: Compiling empty modules. Probably because of changes inside ghc. T9203: I can't reproduce this improvement locally. Might be spurious. ------------------------- Metric Decrease: T12227 T14697 T9203 Metric Increase: T9198 T12545 T18698a T18698b -------------------------
* Avoid fingerprinting the absolute path to the source filePepe Iborra2021-05-2611-8/+96
| | | | | | | | | | | | | | | | | | | | | | | This change aims to make source files relocatable w.r.t. to the interface files produced by the compiler. This is so that we can download interface files produced by a cloud build system and then reuse them in a local ghcide session catch another case of implicit includes actually use the implicit quote includes add another missing case recomp020 test that .hi files are reused even if .hs files are moved to a new location Added recomp021 to record behaviour with non implicit includes add a note additional pointer to the note Mention #16956 in Note
* Support new parser types in GHCAlfredo Di Napoli2021-05-2647-1307/+1569
| | | | | | | | | | | | | | This commit converts the lexers and all the parser machinery to use the new parser types and diagnostics infrastructure. Furthermore, it cleans up the way the parser code was emitting hints. As a result of this systematic approach, the test output of the `InfixAppPatErr` and `T984` tests have been changed. Previously they would emit a `SuggestMissingDo` hint, but this was not at all helpful in resolving the error, and it was even confusing by just looking at the original program that triggered the errors. Update haddock submodule
* Add 9.2 release note about linear caseRichard Eisenberg2021-05-251-0/+6
| | | | | | This is part of #18738 [skip ci]
* Revert "hadrian: Don't always links against libffi"Matthew Pickering2021-05-251-1/+2
| | | | This reverts commit 673ff667c98eafc89e6746d1ac69d33b8330d755.
* [hadrian] Properly build hsc2hs wrapperMoritz Angermann2021-05-251-18/+23
|
* [ci] faster pipelineMoritz Angermann2021-05-251-5/+1
|
* [hadrian] Do not add full tool pathsMoritz Angermann2021-05-253-4/+32
| | | | | | This prohuibits CC=clang to work generically and will always bake in the clang that is found on the build machine in PATH, what ever clang that might be. It might not even be on the final host.
* [ci/darwin] set SH to /bin/bashMoritz Angermann2021-05-251-1/+1
| | | | This should prevent some other `bash` to leak into the binary distributions.
* [ci/darwin] cabal-cache dir can be specified per archMoritz Angermann2021-05-253-23/+38
| | | | Also while we are at it, run shellcheck on ci.sh
* [ci/darwin] use system provided iconv and cursesMoritz Angermann2021-05-254-10/+35
| | | | Also make sure to be able to build with non-apple-clang, while using apple's SDK on macOS
* [bindist] inject xattr -c -r . into the darwin install phaseMoritz Angermann2021-05-252-0/+17
| | | | This is so awful, but at least it might get the job done.
* [ci] no more brew or pipMoritz Angermann2021-05-251-15/+0
| | | | | We pull dependencies (reliably) via nix, and open up nix where needed.
* [ci] darwin uses hadrianMoritz Angermann2021-05-251-48/+24
| | | | | | Make is bad, and really slow, and we should just stop using it outright, or kill hadrian. Let's rather go for hadrian all the way and phase out make.
* 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
|