Skip to content
Snippets Groups Projects
  1. Apr 30, 2022
    • sheaf's avatar
      Testsuite driver: don't crash on empty metrics · a7053a6c
      sheaf authored and Marge Bot's avatar Marge Bot committed
      The testsuite driver crashed when trying to display minimum/maximum
      performance changes when there are no metrics (i.e. there is
      no baseline available). This patch fixes that.
      a7053a6c
    • Ben Gamari's avatar
      rts/m32: Fix assertion failure · b57b5b92
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      This fixes an assertion failure in the m32 allocator due to the
      imprecisely specified preconditions of `m32_allocator_push_filled_list`.
      Specifically, the caller must ensure that the page type is set to filled
      prior to calling `m32_allocator_push_filled_list`.
      
      While this issue did result in an assertion failure in the debug RTS,
      the issue is in fact benign.
      b57b5b92
    • Matthew Pickering's avatar
      Hadrian: Update README about the flavour/testsuite contract · ab677cc8
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      There have been a number of tickets about non-tested flavours not
      passing the testsuite.. this is expected and now noted in the
      documentation. You use other flavours to run the testsuite at your own
      risk.
      
      Fixes #21418
      ab677cc8
    • Matthew Pickering's avatar
      Add test for T21229 · ee891c1e
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      ee891c1e
    • Matthew Pickering's avatar
      Revert "Make the specialiser handle polymorphic specialisation" · 34b28200
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This reverts commit ef013593.
      
      See ticket #21229
      
      -------------------------
      Metric Decrease:
          T15164
      Metric Increase:
          T13056
      -------------------------
      34b28200
    • Chris Martin's avatar
      hacking guide: mention the core libraries committee · d0f14fad
      Chris Martin authored and Marge Bot's avatar Marge Bot committed
      d0f14fad
    • adam's avatar
      users guide: add categories to some flags · d8cbc77e
      adam authored and Marge Bot's avatar Marge Bot committed
      d8cbc77e
    • adam's avatar
      ghc-boot: export typesynonyms from GHC.Utils.Encoding · 2e951e48
      adam authored and Marge Bot's avatar Marge Bot committed
      This makes the Haddocks easier to understand.
      2e951e48
    • Marius Ghita's avatar
      Update user guide example rewrite rules formatting · 39edc7b4
      Marius Ghita authored and Marge Bot's avatar Marge Bot committed
      Change the rewrite rule examples to include a space between the
      composition of `f` and `g` in the map rewrite rule examples.
      
      Without this change, if the user has locally enabled the extension
      OverloadedRecordDot the copied example will result in a compile time
      error that `g` is not a field of `f`.
      
      ```
          • Could not deduce (GHC.Records.HasField "g" (a -> b) (a1 -> b))
              arising from selecting the field ‘g’
      ```
      39edc7b4
    • Ben Gamari's avatar
      Convert More Diagnostics (#20116) · 170da54f
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Replaces uses of `TcRnUnknownMessage` with proper diagnostics
      constructors.
      170da54f
    • Ryan Scott's avatar
      Make mkFunCo take AnonArgFlags into account · e2dd884a
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      Previously, whenever `mkFunCo` would produce reflexive coercions, it would
      use `mkVisFunTy` to produce the kind of the coercion. However, `mkFunCo` is
      also used to produce coercions between types of the form `ty1 => ty2` in
      certain places. This has the unfortunate side effect of causing the type of
      the coercion to appear as `ty1 -> ty2` in certain error messages, as spotted
      in #21328.
      
      This patch address this by changing replacing the use of `mkVisFunTy` with
      `mkFunctionType` in `mkFunCo`. `mkFunctionType` checks the kind of `ty1` and
      makes the function arrow `=>` instead of `->` if `ty1` has kind `Constraint`,
      so this should always produce the correct `AnonArgFlag`. As a result, this
      patch fixes part (2) of #21328.
      
      This is not the only possible way to fix #21328, as the discussion on that
      issue lists some possible alternatives. Ultimately, it was concluded that the
      alternatives would be difficult to maintain, and since we already use
      `mkFunctionType` in `coercionLKind` and `coercionRKind`, using `mkFunctionType`
      in `mkFunCo` is consistent with this choice. Moreover, using `mkFunctionType`
      does not regress the performance of any test case we have in GHC's test suite.
      e2dd884a
    • parsonsmatt's avatar
      Add a note about instance visibility across component boundaries · 0cdef807
      parsonsmatt authored and Marge Bot's avatar Marge Bot committed
      In principle, the *visible* instances are
      * all instances defined in a prior top-level declaration group
        (see docs on `newDeclarationGroup`), or
      * all instances defined in any module transitively imported by the
        module being compiled
      
      However, actually searching all modules transitively below the one being
      compiled is unreasonably expensive, so `reifyInstances` will report only the
      instance for modules that GHC has had some cause to visit during this
      compilation.  This is a shortcoming: `reifyInstances` might fail to report
      instances for a type that is otherwise unusued, or instances defined in a
      different component.  You can work around this shortcoming by explicitly importing the modules
      whose instances you want to be visible. GHC issue #20529
      has some discussion around this.
      
      Fixes #20529
      0cdef807
  2. Apr 29, 2022
  3. Apr 28, 2022
    • Teo Camarasu's avatar
      add since annotation for GHC.Stack.CCS.whereFrom · 292e3971
      Teo Camarasu authored and Marge Bot's avatar Marge Bot committed
      292e3971
    • Ben Gamari's avatar
      configure: Bump GHC version to 9.5 · ca1434e3
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Bumps haddock submodule.
      ca1434e3
    • Simon Peyton Jones's avatar
      Add INLINE pragmas for Enum helper methods · 43bd897d
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      As #21343 showed, we need to be super-certain that the "helper
      methods" for Enum instances are actually inlined or specialised.
      
      I also tripped over this when I discovered that numericEnumFromTo
      and friends had no pragmas at all, so their performance was very
      fragile.  If they weren't inlined, all bets were off.  So I've added
      INLINE pragmas for them too.
      
      See new Note [Inline Enum method helpers] in GHC.Enum.
      
      I also expanded Note [Checking for INLINE loop breakers] in
      GHC.Core.Lint to explain why an INLINE function might temporarily
      be a loop breaker -- this was the initial bug report in #21343.
      
      Strangely we get a 16% runtime allocation decrease in
      perf/should_run/T15185, but only on i386.  Since it moves in the right
      direction I'm disinclined to investigate, so I'll accept it.
      
      Metric Decrease:
          T15185
      43bd897d
    • sheaf's avatar
      Fix unification of ConcreteTvs, removing IsRefl# · a8c99391
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This patch fixes the unification of concrete type variables.
      The subtlety was that unifying concrete metavariables is more subtle
      than other metavariables, as decomposition is possible. See the Note
      [Unifying concrete metavariables], which explains how we unify a
      concrete type variable with a type 'ty' by concretising 'ty', using
      the function 'GHC.Tc.Utils.Concrete.concretise'.
      
      This can be used to perform an eager syntactic check for concreteness,
      allowing us to remove the IsRefl# special predicate. Instead of emitting
      two constraints `rr ~# concrete_tv` and `IsRefl# rr concrete_tv`, we
      instead concretise 'rr'. If this succeeds we can fill 'concrete_tv',
      and otherwise we directly emit an error message to the typechecker
      environment instead of deferring. We still need the error message
      to be passed on (instead of directly thrown), as we might benefit from
      further unification in which case we will need to zonk the stored types.
      To achieve this, we change the 'wc_holes' field of 'WantedConstraints'
      to 'wc_errors', which stores general delayed errors. For the moement,
      a delayed error is either a hole, or a syntactic equality error.
      
      hasFixedRuntimeRep_MustBeRefl is now hasFixedRuntimeRep_syntactic, and
      hasFixedRuntimeRep has been refactored to directly return the most
      useful coercion for PHASE 2 of FixedRuntimeRep.
      
      This patch also adds a field ir_frr to the InferResult datatype,
      holding a value of type Maybe FRROrigin. When this value is not
      Nothing, this means that we must fill the ir_ref field with a type
      which has a fixed RuntimeRep.
      When it comes time to fill such an ExpType, we ensure that the type
      has a fixed RuntimeRep by performing a representation-polymorphism
      check with the given FRROrigin
      This is similar to what we already do to ensure we fill an Infer
      ExpType with a type of the correct TcLevel.
      This allows us to properly perform representation-polymorphism checks
      on 'Infer' 'ExpTypes'.
      
      The fillInferResult function had to be moved to GHC.Tc.Utils.Unify
      to avoid a cyclic import now that it calls hasFixedRuntimeRep.
      
      This patch also changes the code in matchExpectedFunTys to make use
      of the coercions, which is now possible thanks to the previous change.
      This implements PHASE 2 of FixedRuntimeRep in some situations.
      For example, the test cases T13105 and T17536b are now both accepted.
      
      Fixes #21239 and #21325
      
      -------------------------
      Metric Decrease:
          T18223
          T5631
      -------------------------
      a8c99391
    • Ben Gamari's avatar
      Bump process submodule · 61305184
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      61305184
    • Ben Gamari's avatar
      hadrian: Clean up flavour transformer definitions · da8ae7f2
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Previously the `ipe` and `omit_pragmas` transformers were hackily
      defined using the textual key-value syntax. Fix this.
      da8ae7f2
    • Matthew Pickering's avatar
      769279e6
    • Douglas Wilson's avatar
      hadrian: Don't pass -rtsopts when building libraries · f9728fdb
      Douglas Wilson authored and Marge Bot's avatar Marge Bot committed
      f9728fdb
    • Douglas Wilson's avatar
      hadrian: add debug_ghc and debug_stage1_ghc flavour transformers · 4ad559c8
      Douglas Wilson authored and Marge Bot's avatar Marge Bot committed
      4ad559c8
    • Douglas Wilson's avatar
      654bafea
    • Douglas Wilson's avatar
      hadrian: Add Monoid instance to Way · c7a3dc29
      Douglas Wilson authored and Marge Bot's avatar Marge Bot committed
      c7a3dc29
    • Ben Gamari's avatar
      testsuite: Add performance test for #14766 · f6a8185d
      Ben Gamari authored
      This distills the essence of the Sigs.hs program found in the ticket.
      f6a8185d
  4. Apr 27, 2022
Loading