summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gitlab-ci: Add integer-simple release build for Windowswip/T16144Ben Gamari2020-03-091-0/+7
| | | | Closes #16144.
* gitlab-ci: Disable Sphinx documentation in Alpine buildBen Gamari2020-03-091-1/+1
|
* nonmoving: Fix collection of sparksBen Gamari2020-03-094-6/+53
| | | | | | | | | | Previously sparks living in the non-moving heap would be promptly GC'd by the minor collector since pruneSparkQueue uses the BF_EVACUATED flag, which non-moving heap blocks do not have set. Fix this by implementing proper support in pruneSparkQueue for determining reachability in the non-moving heap. The story is told in Note [Spark management in the nonmoving heap].
* rts: Report nonmoving collector statistics in machine-readable outputBen Gamari2020-03-051-0/+20
|
* Stats: Add sync pauses to +RTS -S outputBen Gamari2020-03-051-0/+3
|
* nonmoving-gc: Track time usage of nonmoving markingBen Gamari2020-03-0510-24/+286
|
* rts: Add getCurrentThreadCPUTime helperBen Gamari2020-03-053-21/+71
|
* Be explicit about how stack usage of mvar primops are covered.Andreas Klebinger2020-03-041-0/+1
| | | | | | This fixes #17893 [skip-ci]
* Use configure script to detect that we should use in-tree GMP on WindowsSylvain Henry2020-03-024-15/+11
|
* Set `ImpredicativeTypes` during :print command. (#14828)Roland Senn2020-03-023-15/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If ImpredicativeTypes is not enabled, then `:print <term>` will fail if the type of <term> has nested `forall`s or `=>`s. This is because the GHCi debugger's internals will attempt to unify a metavariable with the type of <term> and then display the result, but if the type has nested `forall`s or `=>`s, then unification will fail. As a result, `:print` will bail out and the unhelpful result will be `<term> = (_t1::t1)` (where `t1` is a metavariable). Beware: <term> can have nested `forall`s even if its definition doesn't use RankNTypes! Here is an example from #14828: class Functor f where fmap :: (a -> b) -> f a -> f b Somewhat surprisingly, `:print fmap` considers the type of fmap to have nested foralls. This is because the GHCi debugger sees the type `fmap :: forall f. Functor f => forall a b. (a -> b) -> f a -> f b`. We could envision deeply instantiating this type to get the type `forall f a b. Functor f => (a -> b) -> f a -> f b`, but this trick wouldn't work for higher-rank types. Instead, we adopt a simpler fix: enable `ImpredicativeTypes` when using `:print` and friends in the GHCi debugger. This is allows metavariables to unify with types that have nested (or higher-rank) `forall`s/`=>`s, which makes `:print fmap` display as `fmap = (_t1::forall a b. Functor f => (a -> b) -> f a -> f b)`, as expected. Although ImpredicativeTypes is a somewhat unpredictable from a type inference perspective, there is no danger in using it in the GHCi debugger, since all of the terms that the GHCi debugger deals with have already been typechecked.
* Do not define hs_atomic{read,write}64() on non-64bitIlias Tsitsimpis2020-03-021-0/+5
| | | | | | | | | | | | | | | Do not define hs_atomicread64() and hs_atomicwrite64() on machines where WORD_SIZE_IN_BITS is less than 64, just like we do with the rest of the atomic functions which work on 64-bit values. Without this, compilation fails on MIPSel and PowerPC with the following error: /usr/bin/ld: /<<PKGBUILDDIR>>/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3_p.a(atomic.p_o): in function `hs_atomicread64': atomic.c:(.text.hs_atomicread64+0x8): undefined reference to `__sync_add_and_fetch_8' /usr/bin/ld: /<<PKGBUILDDIR>>/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3_p.a(atomic.p_o): in function `hs_atomicwrite64': atomic.c:(.text.hs_atomicwrite64+0x38): undefined reference to `__sync_bool_compare_and_swap_8' Fixes #17886.
* Remove dead codeKrzysztof Gogolewski2020-03-023-52/+4
| | | | | | | * The names in PrelName and THNames are no longer used since TH merged types and kinds, Typeable is kind-polymorphic, .net support was removed * unqualQuasiQuote no longer used since 6f8ff0bbad3b9fa3
* Show breakpoint locations of breakpoints which were ignored during :force ↵Roland Senn2020-02-2912-21/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#2950) GHCi is split up into 2 major parts: The user-interface (UI) and the byte-code interpreter. With `-fexternal-interpreter` they even run in different processes. Communication between the UI and the Interpreter (called `iserv`) is done using messages over a pipe. This is called `Remote GHCI` and explained in the Note [Remote GHCi] in `compiler/ghci/GHCi.hs`. To process a `:force` command the UI sends a `Seq` message to the `iserv` process. Then `iserv` does the effective evaluation of the value. When during this process a breakpoint is hit, the `iserv` process has no additional information to enhance the `Ignoring breakpoint` output with the breakpoint location. To be able to print additional breakpoint information, there are 2 possible implementation choices: 1. Store the needed information in the `iserv` process. 2. Print the `Ignoring breakpoint` from the UI process. For option 1 we need to store the breakpoint info redundantely in 2 places and this is bad. Therfore option 2 was implemented in this MR: - The user enters a `force` command - The UI sends a `Seq` message to the `iserv` process. - If processing of the `Seq` message hits a breakpoint, the `iserv` process returns control to the UI process. - The UI looks up the source location of the breakpoint, and prints the enhanced `Ignoring breakpoint` output. - The UI sends a `ResumeSeq` message to the `iserv` process, to continue forcing.
* Simplify IfaceIdInfo typeÖmer Sinan Ağacan2020-02-297-48/+16
| | | | | | | | | | | | | | | IfaceIdInfo type is confusing: there's practically no difference between `NoInfo` and `HasInfo []`. The comments say NoInfo is used when -fomit-interface-pragmas is enabled, but we don't need to distinguish `NoInfo` from `HasInfo []` in when reading the interface so the distinction is not important. This patch simplifies the type by removing NoInfo. When we have no info we use an empty list. With this change we no longer read the info list lazily when reading an IfaceInfoItem, but when reading an IfaceId the ifIdInfo field is read lazily, so I doubt this is going to be a problem.
* Fix Hadrian's ``--configure`` (fix #17883)Sylvain Henry2020-02-291-8/+9
|
* rts: enforce POSIX numeric locale for heap profilesJean-Baptiste Mazon2020-02-291-0/+30
|
* docs: correct link to th haddocks from users guideAdam Sandberg Ericsson2020-02-291-1/+1
|
* docs: correct relative links to haddocks from users guide (fixes #17866)Adam Sandberg Ericsson2020-02-291-2/+29
|
* Refactor runtime interpreter codeSylvain Henry2020-02-2913-259/+409
| | | | | | | | | | | | | | | In #14335 we want to be able to use both the internal interpreter (for the plugins) and the external interpreter (for TH and GHCi) at the same time. This patch performs some preliminary refactoring: the `hsc_interp` field of HscEnv replaces `hsc_iserv` and is now used to indicate which interpreter (internal, external) to use to execute TH and GHCi. Opt_ExternalInterpreter flag and iserv options in DynFlags are now queried only when we set the session DynFlags. It should help making GHC multi-target in the future by selecting an interpreter according to the selected target.
* Document and refactor a few things around bitmap scavengingÖmer Sinan Ağacan2020-02-293-36/+17
| | | | | | | | - Added a few comments in StgPAP - Added a few comments and assertions in scavenge_small_bitmap and walk_large_bitmap - Did tiny refactor in GHC.Data.Bitmap: added some comments, deleted dead code, used PlatformWordSize type.
* Rename ghci.sh and build.sh to ghci and build respectivelyXavier Denis2020-02-2926-51/+51
| | | | | | Convert hadrian buildscripts to unsuffixed, dashed form final cleanups
* plugins: Ensure that loadInterface plugins can see annotationsBen Gamari2020-02-291-2/+3
| | | | | | | | loadInterface replaces the `mi_decls`, `mi_insts`, `mi_fam_insts`, `mi_rules`, `mi_anns` fields of ModIface with `undefined` before inserting the interface into the EPS. However, we still want to give loadInterface plugins access to these fields. Consequently, we want to pass the unmodified `ModIface` the plugin.
* Monotonic locations (#17632)Vladislav Zavialov2020-02-2934-214/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When GHC is parsing a file generated by a tool, e.g. by the C preprocessor, the tool may insert #line pragmas to adjust the locations reported to the user. As the result, the locations recorded in RealSrcLoc are not monotonic. Elements that appear later in the StringBuffer are not guaranteed to have a higher line/column number. In fact, there are no guarantees whatsoever, as #line pragmas can arbitrarily modify locations. This lack of guarantees makes ideas such as #17544 infeasible. This patch adds an additional bit of information to every SrcLoc: newtype BufPos = BufPos { bufPos :: Int } A BufPos represents the location in the StringBuffer, unaffected by any pragmas. Updates haddock submodule. Metric Increase: haddock.Cabal haddock.base haddock.compiler MultiLayerModules Naperian parsing001 T12150
* llvm-targets: Add arm-unknown-linux-gnueabiIlias Tsitsimpis2020-02-282-0/+2
| | | | | Add arm-unknown-linux-gnueabi, which is used by Debian's ARM EABI port (armel), as an LLVM target.
* Improve error handling for VTA + deferred type errorsSimon Peyton Jones2020-02-285-22/+35
| | | | | | This fixes #17792 See Note [VTA for out-of-scope functions] in TcExpr
* base: use an explicit import list in System.Environment.ExecutablePathAlp Mestanogullari2020-02-281-1/+1
| | | | This was making -Werror builds fail on Windows (at least with Hadrian).
* nonmoving: Fix marking in compact regionsBen Gamari2020-02-281-11/+13
| | | | | | | | | Previously we were tracing the object we were asked to mark, even if it lives in a compact region. However, there is no need to do this; we need only to mark the region itself as live. I have seen a segfault due to this due to the concurrent mark seeing a an object in the process of being compacted by the mutator.
* boot: Remove remote origin checkKrzysztof Gogolewski2020-02-281-36/+0
| | | | | | Previously, we used relative paths in submodules. When cloning from GitHub, they had to be manually tweaked. Since a76b233d we use absolute paths, so this workaround can be removed.
* configure: correctly generate LIBRARY_template_haskell_VERSIONAdam Sandberg Ericsson2020-02-272-5/+7
|
* PmCheck: Implement Long-distance information with Covered setsSebastian Graf2020-02-2717-157/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider ```hs data T = A | B | C f :: T -> Int f A = 1 f x = case x of A -> 2 B -> 3 C -> 4 ``` Clearly, the RHS returning 2 is redundant. But we don't currently see that, because our approximation to the covered set of the inner case expression just picks up the positive information from surrounding pattern matches. It lacks the context sensivity that `x` can't be `A` anymore! Therefore, we adopt the conceptually and practically superior approach of reusing the covered set of a particular GRHS from an outer pattern match. In this case, we begin checking the `case` expression with the covered set of `f`s second clause, which encodes the information that `x` can't be `A` anymore. After this MR, we will successfully warn about the RHS returning 2 being redundant. Perhaps surprisingly, this was a great simplification to the code of both the coverage checker and the desugarer. Found a redundant case alternative in `unix` submodule, so we have to bump it with a fix. Metric Decrease: T12227
* Modules: Core (#13009)Sylvain Henry2020-02-26151-723/+726
| | | | Update haddock submodule
* testsuite: Make hasMetricsFile RHS more descriptiveBen Gamari2020-02-261-1/+1
|
* Bump hsc2hs submoduleBen Gamari2020-02-261-0/+0
| | | | Fixes name of C compiler.
* SysTools: Don't use process jobs if they are brokenBen Gamari2020-02-261-8/+22
|
* gitlab-ci: Mark some tests as broken on AlpineBen Gamari2020-02-261-4/+7
|
* hadrian: Add --broken-test flagBen Gamari2020-02-264-0/+25
| | | | | This exposes the flag of the same name supported by the testsuite driver.
* testsuite: Allow tests to be marked as broken on the command lineBen Gamari2020-02-263-1/+13
| | | | This allows us to work-around distribution-specific breakage easily.
* gitlab-ci: Add run_hadrian subcommandBen Gamari2020-02-261-9/+11
| | | | | I've ruined two trees already by failing to pass --flavour to hadrian. Let's factor this out so it can be reused during troubleshooting.
* testsuite: Flush stdout buffers in InitEventLoggingBen Gamari2020-02-263-2/+7
| | | | | Otherwise we are sensitive to libc's buffering strategy. Similar to the issue fixed in 543dfaab166c81f46ac4af76918ce32190aaab22.
* gitlab-ci: Fix colors on DarwinBen Gamari2020-02-261-1/+1
| | | | Darwin sh doesn't support \e.
* gitlab-ci: Add shell subcommand for debugging within CI environmentBen Gamari2020-02-261-0/+10
|
* testsuite: Fix symlink testBen Gamari2020-02-261-1/+1
| | | | Needs to `write` bytes, not str.
* gitlab-ci: Use 8.8.3 to bootstrap on WindowsBen Gamari2020-02-261-1/+1
| | | | This should fix #17861.
* Remove dead codeKrzysztof Gogolewski2020-02-268-48/+16
| | | | | | * FailablePattern can no longer be created since ab51bee40c82 Therefore, Opt_WarnMissingMonadFailInstances has no effect anymore. * XWrap is no longer used, it was moved to an extension field
* hadrian: Tell Cabal about integer-gmp library locationBen Gamari2020-02-261-4/+17
|
* hadrian: Refactor gmp argumentsBen Gamari2020-02-261-10/+14
| | | | Move the gmp configuration to its own binding.
* hadrian: Allow libnuma library path to be specifiedBen Gamari2020-02-265-1/+49
|
* Treat coercions as arguments for floating and inliningAlexis King2020-02-268-18/+79
| | | | | This reverts commit 8924224ecfa065ebc67b96a90d01cf9d2edd0e77 and fixes #17787.
* Modules: CmmToAsm (#13009)Sylvain Henry2020-02-2475-534/+493
|
* Comments, small refactorKrzysztof Gogolewski2020-02-245-68/+13
| | | | | | | | | | | | * Remove outdated Note [HsForAllTy tyvar binders] and [Context quantification]. Since the wildcard refactor 1e041b7382, HsForAllTy no longer has an flag controlling explicity. The field `hsq_implicit` is gone too. The current situation is covered by Note [HsType binders] which is already linked from LHsQTyVars. * Small refactor in CoreLint, extracting common code to a function * Remove "not so sure about WpFun" in TcEvidence, per Richard's comment https://gitlab.haskell.org/ghc/ghc/merge_requests/852#note_223226 * Use mkIfThenElse in Foreign/Call, as it does exactly what we need.