Skip to content
Snippets Groups Projects
  1. Mar 29, 2020
    • Marius Bakke's avatar
      testsuite: Remove test that dlopens a PIE object. · 7e7cb714
      Marius Bakke authored and Marge Bot's avatar Marge Bot committed
      glibc 2.30 disallowed dlopening PIE objects, so just remove the test.
      Fixes #17952.
      7e7cb714
    • Sylvain Henry's avatar
      Store ComponentId details · e54500c1
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      As far as GHC is concerned, installed package components ("units") are
      identified by an opaque ComponentId string provided by Cabal. But we
      don't want to display it to users (as it contains a hash) so GHC queries
      the database to retrieve some infos about the original source package
      (name, version, component name).
      
      This patch caches these infos in the ComponentId itself so that we don't
      need to provide DynFlags (which contains installed package informations)
      to print a ComponentId.
      
      In the future we want GHC to support several independent package states
      (e.g. for plugins and for target code), hence we need to avoid
      implicitly querying a single global package state.
      e54500c1
    • Ben Gamari's avatar
      testsuite: Mark T12971 as broken on Windows · ef9c608e
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Due to #17945.
      ef9c608e
    • Ben Gamari's avatar
      testsuite: Fix T17786 · 1f7995ba
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Fix missing quoting and expected exit code.
      1f7995ba
    • Ben Gamari's avatar
      testsuite: Fix T17786 on Windows · 03060b2f
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Fixes line ending normalization issue.
      03060b2f
    • Simon Peyton Jones's avatar
      Demand analysis: simplify the demand for a RHS · 54250f2d
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      Ticket #17932 showed that we were using a stupid demand for the RHS
      of a let-binding, when the result is a product.  This was the result
      of a "fix" in 2013, which (happily) turns out to no longer be
      necessary.
      
      So I just deleted the code, which simplifies the demand analyser,
      and fixes #17932. That in turn uncovered that the anticipation
      of worker/wrapper in CPR analysis was inaccurate, hence the logic
      that decides whether to unbox an argument in WW was extracted into
      a function `wantToUnbox`, now consulted by CPR analysis.
      
      I tried nofib, and got 0.0% perf changes.
      
      All this came up when messing about with !2873 (ticket #17917),
      but is idependent of it.
      
      Unfortunately, this patch regresses #4267 and realised that it is now
      blocked on #16335.
      54250f2d
    • Sylvain Henry's avatar
      Merge GHC.Types.CostCentre.Init into GHC.Driver.CodeOutput · f1a6c73d
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      f1a6c73d
    • Sylvain Henry's avatar
      Remove GHC.Types.Unique.Map module · 1c7c6f1a
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      This module isn't used anywhere in GHC.
      1c7c6f1a
    • Sylvain Henry's avatar
      Modules: Types (#13009) · 1941ef4f
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      Update Haddock submodule
      
      Metric Increase:
         haddock.compiler
      1941ef4f
  2. Mar 26, 2020
  3. Mar 25, 2020
    • Sebastian Graf's avatar
      Remove -fkill-absence and -fkill-one-shot flags · 3e27205a
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      They seem to be a benchmarking vestige of the Cardinality paper and
      probably shouldn't have been merged to HEAD in the first place.
      3e27205a
    • Roland Senn's avatar
      Use export list of Main module in function TcRnDriver.hs:check_main (Fix #16453) · 703221f4
      Roland Senn authored and Marge Bot's avatar Marge Bot committed
      - Provide the export list of the `Main` module as parameter to the
        `compiler/typecheck/TcRnDriver.hs:check_main` function.
      - Instead of `lookupOccRn_maybe` call the function `lookupInfoOccRn`.
        It returns the list `mains_all` of all the main functions in scope.
      - Select from this list `mains_all` all `main` functions that are in
        the export list of the `Main` module.
      - If this new list contains exactly one single `main` function, then
        typechecking continues.
      - Otherwise issue an appropriate error message.
      703221f4
  4. Mar 24, 2020
  5. Mar 23, 2020
  6. Mar 21, 2020
    • Sergej Jaskiewicz's avatar
      Fix event message in withTiming' · 7e0451c6
      Sergej Jaskiewicz authored and Marge Bot's avatar Marge Bot committed
      This typo caused generating 'end' events without the corresponding 'begin' events.
      7e0451c6
    • Richard Eisenberg's avatar
      Update core spec to reflect changes to Core. · 9a96ff6b
      Richard Eisenberg authored and Marge Bot's avatar Marge Bot committed
      Key changes:
       * Adds a new rule for forall-coercions over coercion variables, which
      was implemented but conspicuously missing from the spec.
       * Adds treatment for FunCo.
       * Adds treatment for ForAllTy over coercion variables.
       * Improves commentary (including restoring a Note lost in
      03d48526) in the source.
      
      No changes to running code.
      9a96ff6b
    • Sylvain Henry's avatar
      Hadrian: ignore in-tree GMP objects with ``--lint`` · faa36e5b
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      faa36e5b
    • Richard Eisenberg's avatar
      Simplify treatment of heterogeneous equality · 73a7383e
      Richard Eisenberg authored and Marge Bot's avatar Marge Bot committed
      Previously, if we had a [W] (a :: k1) ~ (rhs :: k2), we would
      spit out a [D] k1 ~ k2 and part the W as irreducible, hoping for
      a unification. But we needn't do this. Instead, we now spit out
      a [W] co :: k2 ~ k1 and then use co to cast the rhs of the original
      Wanted. This means that we retain the connection between the
      spat-out constraint and the original.
      
      The problem with this new approach is that we cannot use the
      casted equality for substitution; it's too like wanteds-rewriting-
      wanteds. So, we forbid CTyEqCans that mention coercion holes.
      
      All the details are in Note [Equalities with incompatible kinds]
      in TcCanonical.
      
      There are a few knock-on effects, documented where they occur.
      
      While debugging an error in this patch, Simon and I ran into
      infelicities in how patterns and matches are printed; we made
      small improvements.
      
      This patch includes mitigations for #17828, which causes spurious
      pattern-match warnings. When #17828 is fixed, these lines should
      be removed.
      73a7383e
  7. Mar 19, 2020
    • Ömer Sinan Ağacan's avatar
      FastString: fix eager reading of string ptr in hashStr · cb1785d9
      Ömer Sinan Ağacan authored and Marge Bot's avatar Marge Bot committed
      This read causes NULL dereferencing when len is 0.
      
      Fixes #17909
      
      In the reproducer in #17909 this bug is triggered as follows:
      
      - SimplOpt.dealWithStringLiteral is called with a single-char string
        ("=" in #17909)
      
      - tailFS gets called on the FastString of the single-char string.
      
      - tailFS checks the length of the string, which is 1, and calls
        mkFastStringByteString on the tail of the ByteString, which is an
        empty ByteString as the original ByteString has only one char.
      
      - ByteString's unsafeUseAsCStringLen returns (NULL, 0) for the empty
        ByteString, which is passed to mkFastStringWith.
      
      - mkFastStringWith gets hash of the NULL pointer via hashStr, which
        fails on empty strings because of this bug.
      cb1785d9
    • Sylvain Henry's avatar
      Refactoring: use Platform instead of DynFlags when possible · 64f20756
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      Metric Decrease:
          ManyConstructors
          T12707
          T13035
          T1969
      64f20756
    • Sebastian Graf's avatar
      PmCheck: Use ConLikeSet to model negative info · b03fd3bc
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      In #17911, Simon recognised many warnings stemming from over-long list
      unions while coverage checking Cabal's `LicenseId` module.
      
      This patch introduces a new `PmAltConSet` type which uses a `UniqDSet`
      instead of an association list for `ConLike`s. For `PmLit`s, it will
      still use an assocation list, though, because a similar map data
      structure would entail a lot of busy work.
      
      Fixes #17911.
      b03fd3bc
    • Andreas Klebinger's avatar
      Update "GHC differences to the FFI Chapter" in user guide. · 5cbf9934
      Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
      The old entry had a heavy focus on how things had been. Which is
      not what I generally look for in a user guide.
      
      I also added a small section on behaviour of nested safe ffi calls.
      
      [skip-ci]
      5cbf9934
Loading