Skip to content
Snippets Groups Projects
  1. Sep 01, 2023
  2. Aug 31, 2023
    • sheaf's avatar
      Add a test for #21765 · dd39bdc0
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This issue (of reporting a constraint as being redundant even though
      removing it causes typechecking to fail) was fixed in aed1974e.
      This commit simply adds a regression test.
      
      Fixes #21765
      dd39bdc0
  3. Aug 30, 2023
  4. Aug 29, 2023
  5. Aug 28, 2023
    • sheaf's avatar
      .stderr: ScopedTypeVariables =/> TypeAbstractions · fadd5b4d
      sheaf authored
      This commit accepts testsuite changes for the changes in the previous
      commit, which mean that TypeAbstractions is no longer implied by
      ScopedTypeVariables.
      fadd5b4d
    • sheaf's avatar
      Remove ScopedTypeVariables => TypeAbstractions · 9eecdf33
      sheaf authored
      This commit implements [amendment 604](https://github.com/ghc-proposals/ghc-proposals/pull/604/)
      to [GHC proposal 448](https://github.com/ghc-proposals/ghc-proposals/pull/448)
      by removing the implication of language extensions
      
        ScopedTypeVariables => TypeAbstractions
      
      To limit breakage, we now allow type arguments in constructor patterns
      when both ScopedTypeVariables and TypeApplications are enabled, but
      we emit a warning notifying the user that this is deprecated behaviour
      that will go away starting in GHC 9.12.
      
      Fixes #23776
      9eecdf33
    • Zubin's avatar
      testsuite: Add regression test for #23864 · b6903f4d
      Zubin authored and Marge Bot's avatar Marge Bot committed
      Simon says this was fixed by
      
      commit 59202c80
      Author: Sebastian Graf <sebastian.graf@kit.edu>
      Date:   Fri Mar 31 17:35:22 2023 +0200
      
          CorePrep: Eliminate EmptyCase and unsafeEqualityProof in CoreToStg instead
      
          We eliminate EmptyCase by way of `coreToStg (Case e _ _ []) = coreToStg e` now.
          The main reason is that it plays far better in conjunction with eta expansion
          (as we aim to do for arguments in CorePrep, #23083), because we can discard
          any arguments, `(case e of {}) eta == case e of {}`, whereas in `(e |> co) eta`
          it's impossible to discard the argument.
      b6903f4d
    • Zubin's avatar
      testsuite: Add regression test for #23861 · 5248fdf7
      Zubin authored
      Simon says this was fixed by
      
      commit 8d686854
      Author: sheaf <sam.derbyshire@gmail.com>
      Date:   Fri Aug 4 15:28:45 2023 +0200
      
          Remove zonk in tcVTA
  6. Aug 25, 2023
  7. Aug 24, 2023
    • Finley McIlwaine's avatar
      Add a test checking overhead of -finfo-table-map · d3e0124c
      Finley McIlwaine authored and Marge Bot's avatar Marge Bot committed
      We want to make sure we don't end up with poor codegen performance resulting from
      -finfo-table-map again as in #23103. This test adds a performance test tracking
      total allocations while compiling ExactPrint with -finfo-table-map.
      d3e0124c
    • Antoine Leblanc's avatar
      Be more eager in TyCon boot validity checking · 1420b8cb
      Antoine Leblanc authored and Marge Bot's avatar Marge Bot committed
      This commit performs boot-file consistency checking for TyCons into
      checkValidTyCl. This ensures that we eagerly catch any mismatches,
      which prevents the compiler from seeing these inconsistencies and
      panicking as a result.
      
      See Note [TyCon boot consistency checking] in GHC.Tc.TyCl.
      
      Fixes #16127
      1420b8cb
  8. Aug 23, 2023
    • Ben Gamari's avatar
      base: Introduce Data.Enum · 4908d798
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      4908d798
    • sheaf's avatar
      Don't attempt pattern synonym error recovery · e7db36c1
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This commit gets rid of the pattern synonym error recovery mechanism
      (recoverPSB). The rationale is that the fake pattern synonym binding
      that the recovery mechanism introduced could lead to undesirable
      knock-on errors, and it isn't really feasible to conjure up a
      satisfactory binding as pattern synonyms can be used both in expressions
      and patterns.
      See Note [Pattern synonym error recovery] in GHC.Tc.TyCl.PatSyn.
      
      It isn't such a big deal to eagerly fail compilation on a pattern synonym
      that doesn't typecheck anyway.
      
      Fixes #23467
      e7db36c1
  9. Aug 22, 2023
    • Alan Zimmerman's avatar
      EPA: Use Introduce [DeclTag] in AnnSortKey · ab40aa52
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      The AnnSortKey is used to keep track of the order of declarations for
      printing when the container has split them apart.
      
      This applies to HsValBinds and ClassDecl, ClsInstDecl.
      
      When making modifications to the list of declarations, the new order
      must be captured for when it must be printed. For each list of
      declarations (binds and sigs for a HsValBind) we can just store the
      list in order.
      
      To recreate the list when printing, we must merge them, and this is
      what the AnnSortKey records. It used to be indexed by SrcSpan, we now
      simply index by a marker as to which list to take the next item from.
      ab40aa52
    • Krzysztof Gogolewski's avatar
      Testsuite cleanup · 52a6d868
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      - Remove misleading help text in perf_notes, ways are not metrics
      - Remove no_print_summary - this was used for Phabricator
      - In linters tests, run 'git ls-files' just once.
        Previously, it was called on each has_ls_files()
      - Add ghc-prim.cabal to gitignore, noticed in #23726
      - Remove ghc-prim.cabal, it was accidentally committed in 524c60c8
      52a6d868
    • ARATA Mizuki's avatar
      Support 128-bit SIMD on AArch64 via LLVM backend · 015886ec
      ARATA Mizuki authored and Marge Bot's avatar Marge Bot committed
      015886ec
    • Krzysztof Gogolewski's avatar
      Fix MultiWayIf linearity checking (#23814) · edd8bc43
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      
      Co-authored-by: default avatarThomas BAGREL <thomas.bagrel@tweag.io>
      edd8bc43
  10. Aug 21, 2023
  11. Aug 17, 2023
  12. Aug 16, 2023
  13. Aug 14, 2023
  14. Aug 10, 2023
    • Finley McIlwaine's avatar
      Add -finfo-table-map-with-fallback -finfo-table-map-with-stack · 261c4acb
      Finley McIlwaine authored and Marge Bot's avatar Marge Bot committed
      The -fno-info-table-map-with-stack flag omits STACK info tables from the info
      table map, and the -fno-info-table-map-with-fallback flag omits info tables
      with defaulted source locations from the map. In a test on the Agda codebase
      the build results were about 7% smaller when both of those types of tables
      were omitted.
      
      Adds a test that verifies that passing each combination of these flags
      results in the correct output for -dipe-stats, which is disabled for the js
      backend since profiling is not implemented.
      
      This commit also refactors a lot of the logic around extracting info tables
      from the Cmm results and building the info table map.
      
      This commit also fixes some issues in the users guide rst source to fix
      warnings that were noticed while debugging the documentation for these flags.
      
      Fixes #23702
      261c4acb
  15. Aug 09, 2023
    • Matthew Craven's avatar
      Bump bytestring submodule to 0.11.5, again · bf885d7a
      Matthew Craven authored and Marge Bot's avatar Marge Bot committed
      Fixes #23789.
      
      The bytestring commit used here is unreleased;
      a release can be made when necessary.
      bf885d7a
    • Sebastian Graf's avatar
      CorePrep: Eta expand arguments (#23083) · 00d31188
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      Previously, we'd only eta expand let bindings and lambdas,
      now we'll also eta expand arguments such as in T23083:
      ```hs
      g f h = f (h `seq` (h $))
      ```
      Unless `-fpedantic-bottoms` is set, we'll now transform to
      ```hs
      g f h = f (\eta -> h eta)
      ```
      in CorePrep.
      
      See the new `Note [Eta expansion of arguments in CorePrep]` for the details.
      
      We only do this optimisation with -O2 because we saw 2-3% ghc/alloc regressions
      in T4801 and T5321FD.
      
      Fixes #23083.
      00d31188
    • Sebastian Graf's avatar
      ANFise string literal arguments (#23270) · 7e0c8b3b
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      This instates the invariant that a trivial CoreExpr translates to an atomic
      StgExpr. Nice.
      
      Annoyingly, in -O0 we sometimes generate
      ```
      foo = case "blah"# of sat { __DEFAULT -> unpackCString# sat }
      ```
      which makes it a bit harder to spot that we can emit a standard
      `stg_unpack_cstring` thunk.
      
      Fixes #23270.
      7e0c8b3b
    • Sebastian Graf's avatar
      Disable tests RepPolyWrappedVar2 and RepPolyUnsafeCoerce1 in JS backend · d8d993f1
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      ... because those coerce between incompatible/unknown PrimReps.
      d8d993f1
    • Sebastian Graf's avatar
      Core.Ppr: Omit case binder for empty case alternatives · 8c73505e
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      A minor improvement to pretty-printing
      8c73505e
    • sheaf's avatar
      Compute all emitted diagnostic codes · 0ef1d8ae
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This commit introduces in GHC.Types.Error.Codes the function
      
        constructorCodes :: forall diag. (...) => Map DiagnosticCode String
      
      which computes a collection of all the diagnostic codes that correspond
      to a particular type. In particular, we can compute the collection of
      all diagnostic codes emitted by GHC using the invocation
      
        constructorCodes @GhcMessage
      
      We then make use of this functionality in the new "codes" test which
      checks consistency and coverage of GHC diagnostic codes.
      It performs three checks:
      
        - check 1: all non-outdated GhcDiagnosticCode equations
          are statically used.
        - check 2: all outdated GhcDiagnosticCode equations
          are statically unused.
        - check 3: all statically used diagnostic codes are covered by
          the testsuite (modulo accepted exceptions).
      0ef1d8ae
  16. Aug 08, 2023
    • Ryan Scott's avatar
      tcExpr: Push expected types for untyped TH splices inwards · 3b373838
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      In !10911, I deleted a `tcExpr` case for `HsUntypedSplice` in favor of a much
      simpler case that simply delegates to `tcApp`. Although this passed the test
      suite at the time, this was actually an error, as the previous `tcExpr` case
      was critically pushing the expected type inwards. This actually matters for
      programs like the one in #23796, which GHC would not accept with type inference
      alone—we need full-blown type _checking_ to accept these.
      
      I have added back the previous `tcExpr` case for `HsUntypedSplice` and now
      explain why we have two different `HsUntypedSplice` cases (one in `tcExpr` and
      another in `splitHsApps`) in `Note [Looking through Template Haskell splices in
      splitHsApps]` in `GHC.Tc.Gen.Head`.
      
      Fixes #23796.
      3b373838
  17. Aug 07, 2023
Loading