Skip to content
Snippets Groups Projects
  1. Oct 14, 2023
  2. Oct 10, 2023
  3. Oct 04, 2023
  4. Sep 30, 2023
  5. Sep 27, 2023
  6. Sep 26, 2023
  7. Sep 19, 2023
  8. Sep 16, 2023
  9. Sep 12, 2023
    • Matthew Pickering's avatar
      Add -Winconsistent-flags warning · 21a906c2
      Matthew Pickering authored and Krzysztof Gogolewski's avatar Krzysztof Gogolewski committed
      The warning fires when inconsistent command line flags are passed.
      
      For example:
      
      * -dynamic-too and -dynamic
      * -dynamic-too on windows
      * -O and --interactive
      * etc
      
      This is on by default and allows users to control whether the warning is
      displayed and whether it should be an error or not.
      
      Fixes #22572
      21a906c2
    • Teo Camarasu's avatar
      Add changelog entry for #23340 · 2b07bf2e
      Teo Camarasu authored and Marge Bot's avatar Marge Bot committed
      2b07bf2e
    • Teo Camarasu's avatar
      nonmoving: introduce a family of dense allocators · f367835c
      Teo Camarasu authored and Marge Bot's avatar Marge Bot committed
      Supplement the existing power 2 sized nonmoving allocators with a family
      of dense allocators up to a configurable threshold.
      
      This should reduce waste from rounding up block sizes while keeping the
      amount of allocator sizes manageable.
      
      This patch:
        - Adds a new configuration option `--nonmoving-dense-allocator-count`
          to control the amount of these new dense allocators.
        - Adds some constants to `NonmovingAllocator` in order to keep
          marking fast with the new allocators.
      
      Resolves #23340
      f367835c
    • Teo Camarasu's avatar
      docs: move -xn flag beside --nonmoving-gc · 98166389
      Teo Camarasu authored and Marge Bot's avatar Marge Bot committed
      It makes sense to have these beside each other as they are aliases.
      98166389
  10. Sep 09, 2023
  11. Sep 08, 2023
  12. Sep 05, 2023
  13. Sep 01, 2023
  14. Aug 30, 2023
  15. Aug 26, 2023
  16. Aug 23, 2023
  17. Aug 22, 2023
  18. Aug 17, 2023
  19. Aug 15, 2023
  20. Aug 14, 2023
  21. 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
    • Finley McIlwaine's avatar
      Add -dipe-stats flag · cc52c358
      Finley McIlwaine authored and Marge Bot's avatar Marge Bot committed
      This is useful for seeing which info tables have information.
      cc52c358
  22. Aug 09, 2023
    • 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
  23. Aug 03, 2023
  24. Aug 01, 2023
    • Bartłomiej Cieślar's avatar
      Implementation of the Deprecated Instances proposal #575 · d2bedffd
      Bartłomiej Cieślar authored and Marge Bot's avatar Marge Bot committed
      
      This commit implements the ability to deprecate certain instances,
      which causes the compiler to emit the desired deprecation message
      whenever they are instantiated. For example:
      
        module A where
        class C t where
        instance {-# DEPRECATED "dont use" #-} C Int where
      
        module B where
        import A
        f :: C t => t
        f = undefined
        g :: Int
        g = f -- "dont use" emitted here
      
      The implementation is as follows:
        - In the parser, we parse deprecations/warnings attached to instances:
      
            instance {-# DEPRECATED "msg" #-} Show X
            deriving instance {-# WARNING "msg2" #-} Eq Y
      
          (Note that non-standalone deriving instance declarations do not support
          this mechanism.)
      
        - We store the resulting warning message in `ClsInstDecl` (respectively, `DerivDecl`).
          In `GHC.Tc.TyCl.Instance.tcClsInstDecl` (respectively, `GHC.Tc.Deriv.Utils.newDerivClsInst`),
          we pass on that information to `ClsInst` (and eventually store it in `IfaceClsInst` too).
      
        - Finally, when we solve a constraint using such an instance, in
          `GHC.Tc.Instance.Class.matchInstEnv`, we emit the appropriate warning
          that was stored in `ClsInst`.
          Note that we only emit a warning when the instance is used in a different module
          than it is defined, which keeps the behaviour in line with the deprecation of
          top-level identifiers.
      
      Signed-off-by: default avatarBartłomiej Cieślar <bcieslar2001@gmail.com>
      d2bedffd
  25. Jul 26, 2023
    • Bartłomiej Cieślar's avatar
      This MR is an implementation of the proposal #516. · 503fd647
      Bartłomiej Cieślar authored and Marge Bot's avatar Marge Bot committed
      It adds a warning -Wincomplete-record-selectors for usages of a record
      field access function (either a record selector or getField @"rec"),
      while trying to silence the warning whenever it can be sure that a constructor
      without the record field would not be invoked (which would otherwise cause
      the program to fail). For example:
      
          data T = T1 | T2 {x :: Bool}
      
          f a = x a -- this would throw an error
      
          g T1 = True
          g a = x a -- this would not throw an error
      
          h :: HasField "x" r Bool => r -> Bool
          h = getField @"x"
      
          j :: T -> Bool
          j = h -- this would throw an error because of the `HasField`
                -- constraint being solved
      
      See the tests DsIncompleteRecSel* and TcIncompleteRecSel for more examples of the warning.
      See Note [Detecting incomplete record selectors] in GHC.HsToCore.Expr for implementation details
      503fd647
  26. Jul 23, 2023
    • Vladislav Zavialov's avatar
      Visible forall in types of terms: Part 1 (#22326) · 33b6850a
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      This patch implements part 1 of GHC Proposal #281,
      introducing explicit `type` patterns and `type` arguments.
      
      Summary of the changes:
      
      1. New extension flag:
           RequiredTypeArguments
      
      2. New user-facing syntax:
           `type p` patterns    (represented by EmbTyPat)
           `type e` expressions (represented by HsEmbTy)
      
      3. Functions with required type arguments (visible forall)
         can now be defined and applied:
            idv :: forall a -> a -> a    -- signature   (relevant change: checkVdqOK in GHC/Tc/Validity.hs)
            idv (type a) (x :: a) = x    -- definition  (relevant change: tcPats in GHC/Tc/Gen/Pat.hs)
            x = idv (type Int) 42        -- usage       (relevant change: tcInstFun in GHC/Tc/Gen/App.hs)
      
      4. template-haskell support:
            TH.TypeE corresponds to HsEmbTy
            TH.TypeP corresponds to EmbTyPat
      
      5. Test cases and a new User's Guide section
      
      Changes *not* included here are the t2t (term-to-type) transformation
      and term variable capture; those belong to part 2.
      33b6850a
  27. Jul 22, 2023
  28. Jul 19, 2023
  29. Jul 18, 2023
  30. Jul 15, 2023
    • Matthew Craven's avatar
      Equality of forall-types is visibility aware · cf86f3ec
      Matthew Craven authored and Vladislav Zavialov's avatar Vladislav Zavialov committed
      This patch finally (I hope) nails the question of whether
         (forall a. ty) and (forall a -> ty)
      are `eqType`: they aren't!
      
      There is a long discussion in #22762, plus useful Notes:
      
      * Note [ForAllTy and type equality] in GHC.Core.TyCo.Compare
      * Note [Comparing visiblities] in GHC.Core.TyCo.Compare
      * Note [ForAllCo] in GHC.Core.TyCo.Rep
      
      It also establishes a helpful new invariant for ForAllCo,
      and ForAllTy, when the bound variable is a CoVar:in that
      case the visibility must be coreTyLamForAllTyFlag.
      
      All this is well documented in revised Notes.
      cf86f3ec
  31. Jul 13, 2023
    • Rodrigo Mesquita's avatar
      configure: Drop DllWrap command · 5e951395
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      We used to configure into settings a DllWrap command for windows
      builds and distributions, however, we no longer do, and dllwrap is
      effectively unused.
      
      This simplification is motivated in part by the larger
      toolchain-selection project (#19877, !9263)
      5e951395
  32. Jul 11, 2023
    • Ben Gamari's avatar
      compiler: Record original thunk info tables on stack · eb623149
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Here we introduce a new code generation option, `-forig-thunk-info`,
      which ensures that an `stg_orig_thunk_info` frame is pushed before every
      update frame. This can be invaluable when debugging thunk cycles and
      similar.
      
      See Note [Original thunk info table frames] for details.
      
      Closes #23255.
      eb623149
Loading