summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* EPA: Fix explicit specificity and unicode linear arrow annotationswip/az/T19839Alan Zimmerman2021-05-208-18/+66
| | | | | Closes #19839 Closes #19840
* 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
|
* CI: Disable darwin buildsMatthew Pickering2021-05-191-2/+2
| | | | | They are taking over 4 hours to complete which is stalling the rest of the merge pipeline.
* genprimopcode: fix bootstrap errorsSylvain Henry2021-05-132-4/+3
| | | | | * Fix for unqualified Data.List import * Fix monad instance
* Use fix-sized order primops for fixed size boxed typesJohn Ericson2021-05-132-24/+24
| | | | Progress towards #19026
* ci: Fix unbound CI_MERGE_REQUEST_SOURCE_BRANCH_NAME variableMatthew Pickering2021-05-121-1/+1
| | | | Fixes #19831
* EPA: Fix incorrect SrcSpan for FamDeclAlan Zimmerman2021-05-129-16/+37
| | | | | | | The SrcSpan for a type family declaration did not include the family equations. Closes #19821
* Remove useless {-# LANGUAGE CPP #-} pragmasSylvain Henry2021-05-12265-314/+272
|
* Fully remove HsVersions.hSylvain Henry2021-05-12268-641/+84
| | | | | | | | | | Replace uses of WARN macro with calls to: warnPprTrace :: Bool -> SDoc -> a -> a Remove the now unused HsVersions.h Bump haddock submodule
* Replace CPP assertions with Haskell functionsSylvain Henry2021-05-12178-909/+1061
| | | | | | | | | | | | | | | There is no reason to use CPP. __LINE__ and __FILE__ macros are now better replaced with GHC's CallStack. As a bonus, assert error messages now contain more information (function name, column). Here is the mapping table (HasCallStack omitted): * ASSERT: assert :: Bool -> a -> a * MASSERT: massert :: Bool -> m () * ASSERTM: assertM :: m Bool -> m () * ASSERT2: assertPpr :: Bool -> SDoc -> a -> a * MASSERT2: massertPpr :: Bool -> SDoc -> m () * ASSERTM2: assertPprM :: m Bool -> SDoc -> m ()
* Ensure assert from Control.Exception isn't usedSylvain Henry2021-05-1210-13/+12
|
* Move GlobalVar macros into GHC.Utils.GlobalVarsSylvain Henry2021-05-123-35/+32
| | | | | That's the only place where they are used and they shouldn't be used elsewhere.
* Hadrian: Enable SMP on powerpc64{le}Peter Trommler2021-05-121-1/+10
| | | | Fixes #19825
* hadrian: Fix dynamic+debug flag combination for check-ppr executableMatthew Pickering2021-05-121-2/+2
|
* W/W: Always zap useless idInfos.Andreas Klebinger2021-05-121-2/+28
| | | | | | | | | | | tryWW used to always returns an Id with a zapped: * DmdEnv * Used Once info except in the case where the ID was guaranteed to be inlined. We now also zap the info in that case. Fixes #19818.
* Hadrian: add comment to avoid surprisesSylvain Henry2021-05-111-2/+2
|
* rts: Remove trailing whitespace from Adjustor.cMatthew Pickering2021-05-111-32/+32
|
* hadrian: Don't always links against libffiMatthew Pickering2021-05-111-2/+1
| | | | | | | | | The RTS flag `ffi` is set to either True or False depending on whether we want to link against `libffi`, therefore in order to work out whether to add the build tree to the arguments we check whether `ffi` is in the extraLibs or not before adding the argument. Fixes #16022
* base: Update Unicode data to 13.0.0Ben Gamari2021-05-115-49/+101
| | | | (cherry picked from commit d22e087f7bf74341c4468f11b4eb0273033ca931)
* EPA: record annotations for braces in LetStmtAlan Zimmerman2021-05-116-5/+15
| | | | Closes #19814
* Fix strictness and arity info in SpecConstrSimon Peyton Jones2021-05-117-77/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In GHC.Core.Opt.SpecConstr.spec_one we were giving join-points an incorrect join-arity -- this was fallout from commit c71b220491a6ae46924cc5011b80182bcc773a58 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Thu Apr 8 23:36:24 2021 +0100 Improvements in SpecConstr * Allow under-saturated calls to specialise See Note [SpecConstr call patterns] This just allows a bit more specialisation to take place. and showed up in #19780. I refactored the code to make the new function calcSpecInfo which treats join points separately. In doing this I discovered two other small bugs: * In the Var case of argToPat we were treating UnkOcc as uninteresting, but (by omission) NoOcc as interesting. As a result we were generating SpecConstr specialisations for functions with unused arguments. But the absence anlyser does that much better; doing it here just generates more code. Easily fixed. * The lifted/unlifted test in GHC.Core.Opt.WorkWrap.Utils.mkWorkerArgs was back to front (#19794). Easily fixed. * In the same function, mkWorkerArgs, we were adding an extra argument nullary join points, which isn't necessary. I added a test for this. That in turn meant I had to remove an ASSERT in CoreToStg.mkStgRhs for nullary join points, which was always bogus but now trips; I added a comment to explain.
* Document unfolding treatment of simplLamBndr.Andreas Klebinger2021-05-111-3/+5
| | | | Fixes #19817
* Don't warn about ClassOp bindings not specialising.Andreas Klebinger2021-05-114-0/+57
| | | | Fixes #19586
* EPA: Use custom AnnsIf structure for HsIf and HsCmdIfAlan Zimmerman2021-05-119-16/+72
| | | | | | | This clearly identifies the presence and location of optional semicolons in an if statement. Closes #19813
* Minor refactoring in WorkWrapSimon Peyton Jones2021-05-111-15/+7
| | | | | | This patch just does the tidying up from #19805. No change in behaviour.
* Expand Note [Data con representation].Andreas Klebinger2021-05-111-4/+30
| | | | Not perfect. But I consider this to be a documentation fix for #19789.
* EPA: properly capture leading semicolons in statement listsAlan Zimmerman2021-05-097-8/+24
| | | | | | | | | | | | | | For the fragment blah = do { ; print "a" ; print "b" } capture the leading semicolon before 'print "a"' in 'al_rest' in AnnList instead of in 'al_trailing'. Closes #19798