summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Minor TTG clean-up: comments, unused families, bottomwip/ttg-cleanupVladislav Zavialov2020-10-012-52/+54
| | | | | | 1. Fix and update section headers in GHC/Hs/Extension.hs 2. Delete the unused 'XCoreAnn' and 'XTickPragma' families 3. Avoid calls to 'panic' in 'pprStmt'
* Regression test for #10709.Richard Eisenberg2020-09-305-0/+110
| | | | Close #10709
* Pmc: Don't call exprType on type arguments (#18767)Sebastian Graf2020-09-301-1/+2
| | | | Fixes #18767.
* Omit redundant kind equality check in solverRichard Eisenberg2020-09-301-13/+21
| | | | | | | See updated Note [Use loose types in inert set] in GHC.Tc.Solver.Monad. Close #18753.
* Remove unused global variablesSylvain Henry2020-09-303-14/+0
| | | | | | | | | | Some removed globals variables were still declared in the RTS. They were removed in the following commits: * 4fc6524a2a4a0003495a96c8b84783286f65c198 * 0dc7985663efa1739aafb480759e2e2e7fca2a36 * bbd3c399939311ec3e308721ab87ca6b9443f358
* Remove unsafeGlobalDynFlags (#17957, #14597)Sylvain Henry2020-09-3017-140/+186
| | | | | There are still global variables but only 3 booleans instead of a single DynFlags.
* Bump Cabal, hsc2hs, directory, process submodulesBen Gamari2020-09-307-3/+3
| | | | Necessary for recent Win32 bump.
* testsuite: Mark T12971 as broken on WindowsBen Gamari2020-09-301-1/+1
| | | | Due to #17945.
* PmCheck: Long-distance information for LocalBinds (#18626)Sebastian Graf2020-09-306-26/+138
| | | | | | | | | | | | | | | | | | | | | | Now `desugarLocalBind` (formerly `desugarLet`) reasons about * `FunBind`s that * Have no pattern matches (so which aren't functions) * Have a singleton match group with a single GRHS * (which may have guards) * and looks through trivial post-typechecking `AbsBinds` in doing so to pick up the introduced renamings. And desugars to `PmLet` LYG-style guards. Since GRHSs are no longer denoted simply by `NonEmpty PmGRHS`, but also need to carry a `[PmGrd]` for the `PmLet`s from `LocalBind`s, I added `PmGRHSs` to capture that. Since we call out to the desugarer more often, I found that there were superfluous warnings emitted when desugaring e.g. case expressions. Thus, I made sure that we deactivate any warnings in the LYG desugaring steps by the new wrapper function `noCheckDs`. There's a regression test in `T18626`. Fixes #18626.
* Make the parser module less dependent on DynFlagsSylvain Henry2020-09-2915-89/+109
| | | | Bump haddock submodule
* Add regression test #18501Ryan Scott2020-09-293-0/+5
| | | | | ghc/ghc!3220 ended up fixing #18501. This patch adds a regression test for #18501 to ensure that it stays fixed.
* Workaround for #18623: GHC crashes bc. under rlimit for vmem it will reserveBenjamin Maurer2020-09-292-5/+58
| | | | | | _all_ of it, leaving nothing for, e.g., thread stacks. Fix will only allocate 2/3rds and check whether remainder is at least large enough for minimum amount of thread stacks.
* Description of flag `-H` was in 'verbosity options', moved to 'misc'.Benjamin Maurer2020-09-291-8/+8
| | | | Fixes #18699
* Improve error messages for (a %m) without LinearTypesVladislav Zavialov2020-09-292-11/+19
| | | | | | | | Detect when the user forgets to enable the LinearTypes extension and produce a better error message. Steals the (a %m) syntax from TypeOperators, the workaround is to write (a % m) instead.
* New linear types syntax: a %p -> b (#18459)Vladislav Zavialov2020-09-2973-162/+183
| | | | | | Implements GHC Proposal #356 Updates the haddock submodule.
* Linear types: fix kind inference when checking dataconsKrzysztof Gogolewski2020-09-291-1/+3
|
* Optimize NthCo (FunCo ...) in coercion optRichard Eisenberg2020-09-293-28/+39
| | | | | | | | | | We were missing this case previously. Close #18528. Metric Decrease: T18223 T5321Fun
* Remove outdated comment in rnHsTyKiVladislav Zavialov2020-09-271-4/+0
| | | | | This comment dates back to 3df40b7b78044206bbcffe3e2c0a57d901baf5e8 and does not seem relevant anymore.
* Don't rearrange (->) in the renamerVladislav Zavialov2020-09-271-36/+26
| | | | | | | | | | The parser produces an AST where the (->) is already associated correctly: 1. (->) has the least possible precedence 2. (->) is right-associative Thus we don't need to handle it in mkHsOpTyRn.
* Comments: change outdated reference to mergeOpswip/docs-no-merge-opsVladislav Zavialov2020-09-271-1/+1
| | | | | | | As of 686e06c59c3aa6b66895e8a501c7afb019b09e36, GHC.Parser.PostProcess.mergeOps no longer exists. [ci skip]
* Fix handling of function coercions (#18747)Krzysztof Gogolewski2020-09-264-1/+135
| | | | This was broken when we added multiplicity to the function type.
* Disallow linear types in FFI (#18472)Krzysztof Gogolewski2020-09-264-10/+48
|
* Make 'undefined x' linear in 'x' (#18731)Krzysztof Gogolewski2020-09-263-2/+13
|
* Bignum: add bigNatFromWordArraySylvain Henry2020-09-262-0/+45
| | | | Reimplementation of integer-gmp's byteArrayToBigNat#
* Extract SharedIdEnv into its own moduleSebastian Graf2020-09-265-143/+160
| | | | | | It's now named `GHC.Types.Unique.SDFM.UniqSDFM`. The implementation is more clear about its stated goals and supported operations.
* PmCheck: Big refactor of module structureSebastian Graf2020-09-2618-1826/+2001
| | | | | | | | | | | | | | * Move everything from `GHC.HsToCore.PmCheck.*` to `GHC.HsToCore.Pmc.*` in analogy to `GHC.Tc`, rename exported `covCheck*` functions to `pmc*` * Rename `Pmc.Oracle` to `Pmc.Solver` * Split off the LYG desugaring and checking steps into their own modules (`Pmc.Desugar` and `Pmc.Check` respectively) * Split off a `Pmc.Utils` module with stuff shared by `Pmc.{,Desugar,Check,Solver}` * Move `Pmc.Types` to `Pmc.Solver.Types`, add a new `Pmc.Types` module with all the LYG types, which form the interfaces between `Pmc.{Desugar,Check,Solver,}`.
* Various documentation fixesKrzysztof Gogolewski2020-09-259-20/+21
| | | | | | | | | | | * Remove UnliftedFFITypes from conf. Some time ago, this extension was undocumented and we had to silence a warning. This is no longer needed. * Use r'' in conf.py. This fixes a Sphinx warning: WARNING: Support for evaluating Python 2 syntax is deprecated and will be removed in Sphinx 4.0. Convert docs/users_guide/conf.py to Python 3 syntax. * Mark GHCForeignImportPrim as documented * Fix formatting in template_haskell.rst * Remove 'recursive do' from the list of unsupported items in TH
* Fix typed holes causing linearity errors (#18491)Krzysztof Gogolewski2020-09-253-0/+10
|
* Bignum: implement extended GCD (#18427)Sylvain Henry2020-09-2513-30/+1415
|
* Bignum: refactor backend modulesSylvain Henry2020-09-258-38/+53
| | | | | | * move backends into GHC.Num.Backend.* * split backend selection into GHC.Num.Backend and GHC.Num.Backend.Selected to avoid duplication with the Check backend
* Pattern guards BindStmt always use multiplicity ManyArnaud Spiwack2020-09-254-1/+21
| | | | | | | | | Fixes #18439 . The rhs of the pattern guard was consumed with multiplicity one, while the pattern assumed it was Many. We use Many everywhere instead. This is behaviour consistent with that of `case` expression. See #18738.
* Print RET_BIG stack closuresSven Tennie2020-09-251-7/+13
| | | | | | | | | A RET_BIG closure has a large bitmap that describes it's payload and can be printed with printLargeBitmap(). Additionally, the output for payload closures of small and big bitmaps is changed: printObj() is used to print a bit more information about what's on the stack.
* Accept new test output for #17218Sebastian Graf2020-09-252-4/+2
| | | | | | The expected test output was plain wrong. It has been fixed for a long time. Thus we can close #17218.
* Add a regression test for #18609Sebastian Graf2020-09-253-0/+75
| | | | | The egregious performance hits are gone since !4050. So we fix #18609.
* Add regression tests for #18371Sebastian Graf2020-09-253-0/+66
| | | | | They have been fixed by !3959, I believe. Fixes #18371.
* gitlab-ci: Drop Darwin cleanup jobBen Gamari2020-09-251-39/+0
| | | | We now have a proper periodic clean-up script installed on the runners.
* Stop removing definitions of record fields in GHC.Iface.Ext.AstZubin Duggal2020-09-251-16/+10
|
* ci: Add ad-hoc performance testing ruleBen Gamari2020-09-252-0/+64
|
* ci.sh: Factor out common utilitiesBen Gamari2020-09-252-47/+55
|
* Make sizeExpr strict in the size threshold to facilitate WW.Andreas Klebinger2020-09-251-1/+4
|
* Namespace the Hadrian linting rule for baseHécate2020-09-241-6/+6
|
* PmCheck: Desugar string literal patterns with -XRebindableSyntax correctly ↵Sebastian Graf2020-09-244-5/+38
| | | | | | (#18708) Fixes #18708.
* Improve kind generalisation, error messagesSimon Peyton Jones2020-09-24141-964/+1329
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does two things: * It refactors GHC.Tc.Errors a bit. In debugging Quick Look I was forced to look in detail at error messages, and ended up doing a bit of refactoring, esp in mkTyVarEqErr'. It's still quite a mess, but a bit better, I think. * It makes a significant improvement to the kind checking of type and class declarations. Specifically, we now ensure that if kind checking fails with an unsolved constraint, all the skolems are in scope. That wasn't the case before, which led to some obscure error messages; and occasional failures with "no skolem info" (eg #16245). Both of these, and the main Quick Look patch itself, affect a /lot/ of error messages, as you can see from the number of files changed. I've checked them all; I think they are as good or better than before. Smaller things * I documented the various instances of VarBndr better. See Note [The VarBndr tyep and its uses] in GHC.Types.Var * Renamed GHC.Tc.Solver.simpl_top to simplifyTopWanteds * A bit of refactoring in bindExplicitTKTele, to avoid the footwork with Either. Simpler now. * Move promoteTyVar from GHC.Tc.Solver to GHC.Tc.Utils.TcMType Fixes #16245 (comment 211369), memorialised as typecheck/polykinds/T16245a Also fixes the three bugs in #18640
* Implement Quick Look impredicativitySimon Peyton Jones2020-09-2494-2119/+3412
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements Quick Look impredicativity (#18126), sticking very closely to the design in A quick look at impredicativity, Serrano et al, ICFP 2020 The main change is that a big chunk of GHC.Tc.Gen.Expr has been extracted to two new modules GHC.Tc.Gen.App GHC.Tc.Gen.Head which deal with typechecking n-ary applications, and the head of such applications, respectively. Both contain a good deal of documentation. Three other loosely-related changes are in this patch: * I implemented (partly by accident) points (2,3)) of the accepted GHC proposal "Clean up printing of foralls", namely https://github.com/ghc-proposals/ghc-proposals/blob/ master/proposals/0179-printing-foralls.rst (see #16320). In particular, see Note [TcRnExprMode] in GHC.Tc.Module - :type instantiates /inferred/, but not /specified/, quantifiers - :type +d instantiates /all/ quantifiers - :type +v is killed off That completes the implementation of the proposal, since point (1) was done in commit df08468113ab46832b7ac0a7311b608d1b418c4d Author: Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> Date: Mon Feb 3 21:17:11 2020 +0100 Always display inferred variables using braces * HsRecFld (which the renamer introduces for record field selectors), is now preserved by the typechecker, rather than being rewritten back to HsVar. This is more uniform, and turned out to be more convenient in the new scheme of things. * The GHCi debugger uses a non-standard unification that allows the unification variables to unify with polytypes. We used to hack this by using ImpredicativeTypes, but that doesn't work anymore so I introduces RuntimeUnkTv. See Note [RuntimeUnkTv] in GHC.Runtime.Heap.Inspect Updates haddock submodule. WARNING: this patch won't validate on its own. It was too hard to fully disentangle it from the following patch, on type errors and kind generalisation. Changes to tests * Fixes #9730 (test added) * Fixes #7026 (test added) * Fixes most of #8808, except function `g2'` which uses a section (which doesn't play with QL yet -- see #18126) Test added * Fixes #1330. NB Church1.hs subsumes Church2.hs, which is now deleted * Fixes #17332 (test added) * Fixes #4295 * This patch makes typecheck/should_run/T7861 fail. But that turns out to be a pre-existing bug: #18467. So I have just made T7861 into expect_broken(18467)
* Update Lock.hs with more documentation to make sure that the Boolean return ↵syd@cs-syd.eu2020-09-241-0/+2
| | | | | | value is clear. [skip ci]
* Remove redundant "do", "return" and language extensions from baseHécate2020-09-2346-188/+191
|
* Preliminary work towards removing DynFlags -> Driver.Ppr dependencySylvain Henry2020-09-231-3/+4
|
* Remove sdocWithDynFlags (fix #10143)Sylvain Henry2020-09-232-12/+2
|
* Refactor CLabel pretty-printingSylvain Henry2020-09-2310-224/+203
| | | | | | | | | | * Don't depend on the selected backend to know if we print Asm or C labels: we already have PprStyle to determine this. Moreover even when a native backend is used (NCG, LLVM) we may want to C headers containing pretty-printed labels, so it wasn't a good predicate anyway. * Make pretty-printing code clearer and avoid partiality
* Bump submodulesBen Gamari2020-09-233-0/+0
| | | | | | * Bump bytestring to 0.10.12.0 * Bump Cabal to 3.4.0.0-rc3 * Bump Win32 to 2.10.0.0