summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Don't use X86_64_ELF_NONPIC_HACK for +RTS -xpcherry-pick-6e96aa2dZejun Wu2019-03-291-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When `+RTS -xp` is passed, when don't need the X86_64_ELF_NONPIC_HACK, becasue the relocation offset should only be out of range if * the object file was not compiled with `-fPIC -fexternal-dynamic-refs`; * ghc generates non-pic code while it should (e.g. #15723) In either case, we should print an error message rather that silently attempt to use a hacky workaround that may not work. This could have made debugging #15723 and #15729 much easier. Test Plan: Run this in a case where ghci used to crash becasue of T15723. Now we see helpful message like: ``` ghc-iserv-prof: R_X86_64_PC32 relocation out of range: stmzm2zi4zi4zi1zmJQn4hNPyYjP5m9AcbI88Ve_ControlziConcurrentziSTMziTMVar_readTMVar_C61n_cc = 9b95ffac ``` Reviewers: simonmar, bgamari, erikd Reviewed By: simonmar, bgamari Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5233 (cherry picked from commit 6e96aa2d503ddeeef1fa1f37b45d5c744522b64d)
* User's Guide: forall is a keyword nowadaysVladislav Zavialov2019-03-212-6/+11
|
* Dot/bang operators in export lists (Trac #16339)Vladislav Zavialov2019-03-214-5/+29
| | | | | | | | The dot type operator was handled in the 'tyvarop' parser production, and the bang type operator in 'tyapp'. However, export lists and role annotations use 'oqtycon', so these type operators could not be exported or assigned roles. The fix is to handle them in a lower level production, 'tyconsym'.
* 'forall' always a keyword, plus the dot type operatorVladislav Zavialov2019-03-2116-87/+74
|
* Bump version to 8.8Ben Gamari2019-03-133-2/+2
|
* Make bkpcabal01 test compatible with new ordering requirements.Edward Z. Yang2019-03-131-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, our test did something like this: 1. Typecheck p 2. Typecheck q (which made use of an instantiated p) 3. Build instantiated p 4. Build instantiated q Cabal previously permitted this, under the reasoning that during typechecking there's no harm in using the instantiated p even if we haven't build it yet; we'll just instantiate it on the fly with p. However, this is not true! If q makes use of a Template Haskell splice from p, we absolutely must have built the instantiated p before we typecheck q, since this typechecking will need to run some splices. Cabal now complains that you haven't done it correctly, which we indeed have not! Reordering so that we do this: 1. Typecheck p 3. Build instantiated p 2. Typecheck q (which made use of an instantiated p) 4. Build instantiated q Fixes the problem. If Cabal had managed the ordering itself, it would have gotten it right. Signed-off-by: Edward Z. Yang <ezyang@fb.com> (cherry picked from commit 6e3e537e419ba8d02dac306d596fba3c1029f123)
* Cmm: Promote stack arguments to word sizePeter Trommler2019-03-131-7/+29
| | | | | | | | | | | | | | | | | | | Smaller than word size integers must be promoted to word size when passed on the stack. While on little endian systems we can get away with writing a small integer to a word size stack slot and read it as a word ignoring the upper bits, on big endian systems a small integer write ends up in the most significant bits and a word size read that ignores the upper bits delivers a random value. On little endian systems a smaller than word size write to the stack might be more efficient but that decision is system specific and should be done as an optimization in the respective backends. Fixes #16258 (cherry picked from commit af7b0fdb64ad1c57f5829e8bd89e8e0fa96b11d2)
* Fix checkStackChunk() call in Interepter.c, enable an assertionÖmer Sinan Ağacan2019-03-132-2/+2
| | | | | | Fixes #16303 (cherry picked from commit 6b890d76a252259843a6e87043f8f12e6a8a0aae)
* API Annotations: parens anns discarded for `(*)` operatorwip/ghc-8.8-azAlan Zimmerman2019-02-275-2/+50
| | | | | | | | | | | | | | | | | The patch from https://phabricator.haskell.org/D4865 introduces go _ (HsParTy _ (dL->L l (HsStarTy _ isUni))) acc ann fix = do { warnStarBndr l ; let name = mkOccName tcClsName (if isUni then "★" else "*") ; return (cL l (Unqual name), acc, fix, ann) } which discards the parens annotations belonging to the HsParTy. Updates haddock submodule Closes #16265 (cherry picked from commit 5e9888bd9c22a1315a703f638591b50e657317c4)
* API Annotations: AnnAt disconnected for TYPEAPPAlan Zimmerman2019-02-2716-71/+200
| | | | | | | | | | | | | | For the code type family F1 (a :: k) (f :: k -> Type) :: Type where F1 @Peano a f = T @Peano f a the API annotation for the first @ is not attached to a SourceSpan in the ParsedSource Closes #16236 (cherry picked from commit cbfc9fcaa33c3b341830962906543dfca1dfedd7)
* API Annotations: more explicit foralls fixupAlan Zimmerman2019-02-276-24/+120
| | | | | | | | | The AnnForall annotations introduced via Phab:D4894 are not always attached to the correct SourceSpan. Closes #16230 (cherry picked from commit be15f7457b98fa0378de7e8146c122757f03c4e9)
* API Annotations: Parens not attached correctly for ClassDeclAlan Zimmerman2019-02-275-38/+57
| | | | | | | | | | | | | The parens around the kinded tyvars should be attached to the class declaration as a whole, they are attached to the tyvar instead, outside the span. An annotation must always be within or after the span it is contained in. Closes #16212 (cherry picked from commit 4bf35da4fccd2a21153a1c19bfa80006e99e02a1)
* check-api-annotations checks for annotation preceding its spanAlan Zimmerman2019-02-2630-43/+233
| | | | | | | | | | | | | | | | | | For an API annotation to be useful, it must not occur before the span it is enclosed in. So, for check-api-annotation output, a line such as ((Test16212.hs:3:22-36,AnnOpenP), [Test16212.hs:3:21]), should be flagged as an error, as the AnnOpenP location of 3:21 precedes its enclosing span of 3:22-26. This patch does this. Closes #16217 (cherry picked from commit 3cf12e6081e7a9f0c3d515de52ffd079186816a5)
* Bump hsc2hs for removed unused matchSebastian Graf2019-02-261-0/+0
|
* Bump Cabal submodulewip/hie-8.8Ben Gamari2019-02-261-0/+0
|
* Lexer: Alternate Layout Rule injects actual not virtual bracesAlan Zimmerman2019-02-265-15/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the alternate layout rule is activated via a pragma, it injects tokens for { and } to make sure that the source is parsed properly. But it injects ITocurly and ITccurly, rather than their virtual counterparts ITvocurly and ITvccurly. This causes problems for ghc-exactprint, which tries to print these. Likewise, any injected ITsemi should have a zero-width SrcSpan. Test case (the existing T13087.hs) {-# LANGUAGE AlternativeLayoutRule #-} {-# LANGUAGE LambdaCase #-} isOne :: Int -> Bool isOne = \case 1 -> True _ -> False main = return () Closes #16279 (cherry picked from commit c1cf2693d6efddeeeb813cd8995a1be136800d17) (cherry picked from commit e0375ba980fd5639d23a29575efb00c30d97c743)
* Revert "Lexer: Alternate Layout Rule injects actual not virtual braces"Ben Gamari2019-02-269-79/+15
| | | | This reverts commit e0375ba980fd5639d23a29575efb00c30d97c743.
* Properly escape character literals in HaddocksAlec Theriault2019-02-257-19/+19
| | | | | | | | Character literals in Haddock should not be written as plain `'\n'` since single quotes are for linking identifiers. Besides, since we want the character literal to be monospaced, we really should use `@\'\\n\'@`. [skip ci]
* template-haskell: Document assembler foreign file supportBen Gamari2019-02-202-0/+4
| | | | See #16180.
* Fix #16188Richard Eisenberg2019-02-2012-41/+251
| | | | | | | | | | | | | | | | There was an awful lot of zipping going on in canDecomposableTyConAppOK, and one of the lists being zipped was too short, causing the result to be too short. Easily fixed. Also fixes #16204 and #16225 test case: typecheck/should_compile/T16188 typecheck/should_compile/T16204[ab] typecheck/should_fail/T16204c typecheck/should_compile/T16225 (cherry picked from commit 4a4ae70f09009c5d32696445a06eacb273f364b5)
* Allow resizing the stack for the graph allocator.klebinger.andreas@gmx.at2019-02-206-36/+105
| | | | | | | | | | | | The graph allocator now dynamically resizes the number of stack slots when running into the limit. This fixes #8657. Also loop membership of basic blocks is now available in the register allocator for cost heuristics. (cherry picked from commit 03b7abc19c8b0ec5c606cc2da208d2d004807fe9)
* Capture and simplify constraints arising from running typed splicesMatthew Pickering2019-02-204-3/+37
| | | | | | | | | | | | | | | | | This fixes a regression caused by #15471 where splicing in a trivial program such as `[|| return () ||]` would fail as the dictionary for `return` would never get bound in the module containing the splice. Arguably this is symptomatic of a major problem affecting TTH where we serialise renamed asts and then retype check them. The reference to the dictionary should be fully determined at the quote site so that splicing doesn't have to solve any implicits at all. It's a coincidence this works due to coherence but see #15863 and #15865 for examples where things do go very wrong. Fixes #16195 (cherry picked from commit a48753bdbc99cda36890e851950f5b79e1c3b2b2)
* Fix #14729 by making the normaliser homogeneousRichard Eisenberg2019-02-2013-371/+636
| | | | | | | | | | | | | | | | | | This ports the fix to #12919 to the normaliser. (#12919 was about the flattener.) Because the fix is involved, this is done by moving the critical piece of code to Coercion, and then calling this from both the flattener and the normaliser. The key bit is: simplifying type families in a type is always a *homogeneous* operation. See #12919 for a discussion of why this is the Right Way to simplify type families. Also fixes #15549. test case: dependent/should_compile/T14729{,kind} typecheck/should_compile/T15549[ab] (cherry picked from commit 2b90356d26b4699227816ad9424e766eccdb6c36)
* Fix #15849 by checking whether there's a do blocknineonine2019-02-206-5/+10
| | | | (cherry picked from commit a08f463bcc9727d91cec4c6e952ad0f5bbc3fbf9)
* testsuite: Always skip T15897Ben Gamari2019-02-201-1/+4
| | | | | | See #16193. (cherry picked from commit f53ef1a72fdebeff19d4a4bd5552d25101c85147)
* Use sigPrec in more places in Convert and HsUtilsRyan Scott2019-02-206-41/+62
| | | | | | | | | | | Trac #16183 was caused by TH conversion (in `Convert`) not properly inserting parentheses around occurrences of explicit signatures where appropriate, such as in applications, function types, and type family equations. Solution: use `parenthesizeHsType sigPrec` in these places. While I was in town, I also updated `nlHsFunTy` to do the same thing. (cherry picked from commit b1e569a54085bf1093b4f858f8c7c739e3be769b)
* Reject oversaturated VKAs in type family equationsRyan Scott2019-02-208-2/+108
| | | | (cherry picked from commit f0cd728fde9bb582930a616cff8d0c5a178c5e14)
* Lexer: Alternate Layout Rule injects actual not virtual bracesAlan Zimmerman2019-02-209-15/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | When the alternate layout rule is activated via a pragma, it injects tokens for { and } to make sure that the source is parsed properly. But it injects ITocurly and ITccurly, rather than their virtual counterparts ITvocurly and ITvccurly. This causes problems for ghc-exactprint, which tries to print these. Likewise, any injected ITsemi should have a zero-width SrcSpan. Test case (the existing T13087.hs) {-# LANGUAGE AlternativeLayoutRule #-} {-# LANGUAGE LambdaCase #-} isOne :: Int -> Bool isOne = \case 1 -> True _ -> False main = return () Closes #16279 (cherry picked from commit c1cf2693d6efddeeeb813cd8995a1be136800d17)
* Fix #16287 by checking for more unsaturated synonym argumentsRyan Scott2019-02-204-24/+46
| | | | | | | | | | | | | | | Trac #16287 shows that we were checking for unsaturated type synonym arguments (in `:kind`) when the argument was to a type synonym, but _not_ when the argument was to some other form of type constructor, such as a data type. The solution is to use the machinery that rejects unsaturated type synonym arguments (previously confined to `check_syn_tc_app`) to `check_arg_type`, which checks these other forms of arguments. While I was in town, I cleaned up `check_syn_tc_app` a bit to only invoke `check_arg_type` so as to minimize the number of different code paths that that function could go down. (cherry picked from commit c07e7ecbdfc05429fb6ce84c547c0365d2754db7)
* base: Document errno behaviour in haddocks.Niklas Hambüchen2019-02-201-1/+5
| | | | | | Also add an implementation comment for details. (cherry picked from commit 76ac103f5021cba5cd000293c7cb8c2bd3148e7a)
* HIE: Save module name and module exportsMatthew Pickering2019-02-203-5/+25
| | | | (cherry picked from commit 69ebf5cb4592b4c89e268937ef7eb96f7c9d4532)
* rts/ProfilerReportJson: Fix format stringBen Gamari2019-02-201-1/+1
| | | | | | This was warning on i386. (cherry picked from commit 7ff127f9e455402da183d1bb1808db024d1fa944)
* Include type info for only some exprs in HIE filesAlec Theriault2019-02-202-8/+68
| | | | | | | | | | | | | | | | | | This commit relinquishes some some type information in `.hie` files in exchange for better performance. See #16233 for more on this. Using `.hie` files to generate hyperlinked sources is a crucial milestone towards Hi Haddock (the initiative to move Haddock to work over `.hi` files and embed docstrings in those). Unfortunately, even after much optimization on the Haddock side, the `.hie` based solution is still considerably slower and more memory hungry than the existing implementation - and the @.hie@ code is to blame. This changes `.hie` file generation to track type information for only a limited subset of expressions (specifically, those that might eventually turn into hyperlinks in the Haddock's hyperlinker backend). (cherry picked from commit 5ed48d25decc9dec29659482644b136cff91606e)
* PPC NCG: Promote integers to word size in C callsPeter Trommler2019-02-202-15/+29
| | | | | | Fixes #16222 (cherry picked from commit 4376d8811418d91bb4d19d61801e95a449b98378)
* make ghc-pkg shut upMoritz Angermann2019-02-201-1/+1
| | | | (cherry picked from commit f00b35f4ddcc61fb1b1f09854bbbf38934ff0865)
* gitlab-ci: Use build cleanup logic on Darwin as wellBen Gamari2019-02-201-3/+21
| | | | | | | We use the shell executor on Darwin as well as Windows. See https://gitlab.com/gitlab-org/gitlab-runner/issues/3856. (cherry picked from commit cfbd39bd405b4cedd3ee10a6d4a2bdd89b6e2e2d)
* gitlab-ci: Fix Windows cleanup command lineBen Gamari2019-02-201-1/+4
| | | | | | | Why is it so hard to delete a directory's contents without deleting the directory itself in Windows? This will forever remain a mystery. (cherry picked from commit 6da9f4c8df7a216234ef50104e400cdcbfbc1bd4)
* Test that hsc2hs works with promoted data constructorsAndrew Martin2019-02-204-0/+20
| | | | (cherry picked from commit 79a5afb613235e93bc2c580987595b9c1324db15)
* Fix incorrectly named configure optionsAlec Theriault2019-02-202-4/+4
| | | | | | | | Although we should use 'AC_ARG_ENABLE' for boolean flags, it also means options get named '--enable-*', not '--with-*'. This should unbreak the --with-intree-gmp option. (cherry picked from commit b89b6e71c798996724ba99f273f88d8a3637fb8d)
* hadrian: use new-exec to make sure alex & happy are in PATH (#16120)Adam Sandberg Eriksson2019-02-203-2/+8
| | | | (cherry picked from commit 5cb071af5b02b7433b2bb4d06062ac8b6fb387e8)
* testsuite: Mark hWaitForInput-accurate-socket as requiring unixBen Gamari2019-02-201-1/+1
| | | | It imports System.Posix.IO.
* testsuite: Remove directories that already exist when seeding extra_filesBen Gamari2019-02-201-0/+2
| | | | | Otherwise the testsuite driver crashes when run multiple times with CLEANUP=NO on a test containing such extra_files.
* testsuite: Normalise styleBen Gamari2019-02-201-6/+7
|
* GhcPlugins: Fix lookup of TH namesBen Gamari2019-02-201-3/+3
| | | | | | | | | | | Previously `thNameToGhcName` was calling `lookupOrigNameCache` directly, which failed to handle the case that the name wasn't already in the name cache. This happens, for instance, when the name was in scope in a plugin being used during compilation but not in scope in the module being compiled. In this case we the interface file containing the name won't be loaded and `lookupOrigNameCache` fails. This was the cause of #16104. The solution is simple: use the nicely packaged `lookupOrigIO` instead.
* testsuite: Add test for #16104Ben Gamari2019-02-209-0/+77
|
* testsuite: Add predicate for CPU feature availabilityBen Gamari2019-02-203-0/+79
| | | | | | | Previously testing code-generation for ISA extensions was nearly impossible since we had no ability to determine whether the host supports the needed extension. Here we fix this by introducing a simple /proc/cpuinfo-based testsuite predicate. We really ought to
* Add @sgraf to CODEOWNERSSebastian Graf2019-02-201-1/+3
| | | [skip ci]
* Add Simon and Richard as more CODEOWNERSRichard Eisenberg2019-02-201-0/+3
| | | | [skip ci]
* gitlab-ci: Explicitly clear dependencies of all jobsBen Gamari2019-02-201-0/+4
| | | | | | | Apparently GitLab CI defaults to declaring all jobs of the previous stage as dependencies of a job. This meant that we would end up downloading all of our binary distributions during the `cleanup` stage, eating up a truly remarkable amount of S3 tranfers.
* testsuite: Skip ghcilink002 when unregisterisedBen Gamari2019-02-201-0/+2
| | | | See #16085.