summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Improve deriveConstants error message.wip/andreask/derive_constantsAndreas Klebinger2021-05-181-1/+2
| | | | This fixes #19823
* 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
* EPA: update some comments in Annotations.Alan Zimmerman2021-05-081-119/+82
| | | | Follow-up from !2418, see #19579
* Fix newtype eta-reductionSimon Peyton Jones2021-05-078-18/+130
| | | | | | | | The eta-reduction we do for newype axioms was generating an inhomogeneous axiom: see #19739. This patch fixes it in a simple way; see GHC.Tc.TyCl.Build Note [Newtype eta and homogeneous axioms]
* rts: Correctly call pthread_setname_np() on NetBSDPHO2021-05-074-5/+34
| | | | | | NetBSD supports pthread_setname_np() but it expects a printf-style format string and a string argument. Also use pthread for itimer on this platform.
* rts/posix/OSThreads.c: Implement getNumberOfProcessors() for NetBSDPHO2021-05-071-6/+19
|
* Allow visible type application for levity-poly data consSimon Peyton Jones2021-05-0729-387/+707
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch was driven by #18481, to allow visible type application for levity-polymorphic newtypes. As so often, it started simple but grew: * Significant refactor: I removed HsConLikeOut from the client-independent Language.Haskell.Syntax.Expr, and put it where it belongs, as a new constructor `ConLikeTc` in the GHC-specific extension data type for expressions, `GHC.Hs.Expr.XXExprGhcTc`. That changed touched a lot of files in a very superficial way. * Note [Typechecking data constructors] explains the main payload. The eta-expansion part is no longer done by the typechecker, but instead deferred to the desugarer, via `ConLikeTc` * A little side benefit is that I was able to restore VTA for data types with a "stupid theta": #19775. Not very important, but the code in GHC.Tc.Gen.Head.tcInferDataCon is is much, much more elegant now. * I had to refactor the levity-polymorphism checking code in GHC.HsToCore.Expr, see Note [Checking for levity-polymorphic functions] Note [Checking levity-polymorphic data constructors]
* [ci] Default values for CI_COMMIT_BRANCH, CI_PROJECT_PATHMoritz Angermann2021-05-071-2/+2
|
* [darwin] stop the DYLD_LIBRARY_PATH madnessMoritz Angermann2021-05-071-5/+2
| | | | | | | | this causes *significant* slowdown on macOS as the linker ends up looking through all the paths. Slowdown can be as bad as 100% or more. (cherry picked from commit 820b0766984d42c06c977a6c32da75c429106f7f)
* [ci/nix-shell] uniquify NIX_LDFLAGS{_FOR_TARGET}Moritz Angermann2021-05-071-1/+11
| | | | (cherry picked from commit 07b1af0362beaaf221cbee7b17bbe0a5606fd87d)
* [testsuite/arm64] fix section_alignmentMoritz Angermann2021-05-071-1/+1
| | | | (cherry picked from commit f7062e1b0c91e8aa78e245a3dab9571206fce16d)
* [testsuite] static001 is not broken anymore.Moritz Angermann2021-05-071-1/+2
| | | | (cherry picked from commit b821fcc7142edff69aa4c47dc1a5bd30b13c1ceb)
* [ci/nix-shell] [Darwin] Stop the ld warnings about libiconv.Moritz Angermann2021-05-071-0/+3
| | | | (cherry picked from commit c3944bc89d062a4850946904133c7a1464d59012)
* [testsuite/json2] Fix failure with LLVM backendsMoritz Angermann2021-05-071-2/+6
| | | | | | | -Wno-unsupported-llvm-version should suppress the LLVM version missmatch warning that messes up the output. (cherry picked from commit 63455300625fc12b2aafc3e339eb307510a6e8bd)
* [ci/nix-shell] Add Foundation and SecurityMoritz Angermann2021-05-071-3/+3
| | | | (cherry picked from commit 4bea83afec009dfd3c6313cac4610d00ba1f9a3d)
* [testsuite] filter out superfluous dylib warningsMoritz Angermann2021-05-071-3/+18
| | | | (cherry picked from commit 33c4d497545559a38bd8d1caf6c94e5e2a77647b)
* [Darwin] mark stdc++ tests as brokenMoritz Angermann2021-05-071-10/+10
| | | | | | There is no libstdc++, only libc++ (cherry picked from commit 57671071adeaf0b45e86bb0ee050e007e3b161fb)
* [Aarch64] No div-by-zero; disable test.Moritz Angermann2021-05-071-0/+5
| | | | (cherry picked from commit 3592d1104c47b006fd9f4127d93916f477a6e010)
* [testsuite/darwin] fix conc059Moritz Angermann2021-05-071-0/+2
| | | | | | | | | | | | | | This resolves the following: Compile failed (exit code 1) errors were: conc059_c.c:27:5: error: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] exit(0); ^ conc059_c.c:27:5: error: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' (cherry picked from commit 5a6c36ecb41fccc07c1b01fe0f330cd38c2a0c76)
* [ci] Default value for MAKE_ARGSMoritz Angermann2021-05-071-2/+2
| | | | | | | We don't pass MAKE_ARGS for windows builds, so this should unbreak them. (cherry picked from commit 16c13d5acfdc8053f7de9e908cc9d845e9bd34bb)
* [ci] default value for CONFIGURE_ARGSMoritz Angermann2021-05-071-1/+1
| | | | (cherry picked from commit 307d34945b7d932156e533736c91097493e6181b)
* [testlib/driver] denoiseMoritz Angermann2021-05-072-6/+11
| | | | | | | | | | this prevents the testlib/driver to be overly noisy, and will also kill some noise produiced by the aarch64-darwin cc (for now). Fixing sysctl, will allow us to run the test's properly in a nix-shell on aarch64-darwin (cherry picked from commit 5109e87e13ab45d799db2013535f54ca35f1f4dc)
* [ci] Add support for building on aarch64-darwinMoritz Angermann2021-05-073-29/+265
| | | | | | | This will fail for now. But allows us to add aarch64-darwin machines to CI. (cherry picked from commit a7d22795ed118abfe64f4fc55d96d8561007ce1e)
* hadrian: Don't depend upon bash from PATHBen Gamari2021-05-066-7/+30
| | | | | | | | Previously Hadrian depended implicitly upon whatever `bash` it found in `PATH`, offerring no way for the user to override. Fix this by detecting `sh` in `configure` and passing the result to Hadrian. Fixes #19797.
* Disallow -XDerivingVia when -XSafe is on (#19786)Aaron Allen2021-05-064-1/+23
| | | | | Since `GeneralizedNewtypeDeriving` is considered unsafe, `DerivingVia` should be as well.
* Bump binary submoduleBen Gamari2021-05-061-0/+0
| | | | Fixes #19631.
* rts/posix/GetTime.c: Use Solaris-specific gethrvtime(3) on OpenSolaris ↵PHO2021-05-061-0/+10
| | | | | | derivatives The constant CLOCK_THREAD_CPUTIME_ID is defined in a system header but it isn't acutally usable. clock_gettime(2) always returns EINVAL.