Zubin pushed to branch wip/backports-9.12.4 at Glasgow Haskell Compiler / GHC

Commits:

9 changed files:

Changes:

  • configure.ac
    ... ... @@ -22,7 +22,7 @@ AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.12.3], [glasgow-ha
    22 22
     AC_CONFIG_MACRO_DIRS([m4])
    
    23 23
     
    
    24 24
     # Set this to YES for a released version, otherwise NO
    
    25
    -: ${RELEASE=YES}
    
    25
    +: ${RELEASE=NO}
    
    26 26
     
    
    27 27
     # The primary version (e.g. 7.5, 7.4.1) is set in the AC_INIT line
    
    28 28
     # above.  If this is not a released version, then we will append the
    

  • docs/users_guide/9.12.4-notes.rst
    1
    +.. _release-9-12-4:
    
    2
    +
    
    3
    +Version 9.12.4
    
    4
    +==============
    
    5
    +
    
    6
    +The significant changes to the various parts of the compiler are listed in the
    
    7
    +following sections. See the `migration guide
    
    8
    +<https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.12>`_ on the GHC Wiki
    
    9
    +for specific guidance on migrating programs to this release.
    
    10
    +
    
    11
    +Compiler
    
    12
    +~~~~~~~~
    
    13
    +
    
    14
    +- Fixed a bug in CSE where the in-scope set was not properly maintained (:ghc-ticket:`25468`)
    
    15
    +- Fixed ``matchExpectedFunTys`` to use ``tcMkScaledFunTys`` (:ghc-ticket:`26277`)
    
    16
    +- Fixed ``parenBreakableList`` usage in ``ppHsContext`` for better pretty-printing of contexts
    
    17
    +- Improved error messages for bad record updates to allow out-of-scope data constructors (:ghc-ticket:`26391`)
    
    18
    +- Fixed a missing InVar->OutVar lookup in ``SetLevels`` (:ghc-ticket:`26681`)
    
    19
    +- Fixed split sections on Windows (:ghc-ticket:`26696`, :ghc-ticket:`26494`)
    
    20
    +- Fixed split sections for the LLVM backend (:ghc-ticket:`26770`)
    
    21
    +- Don't re-use stack slots for growing registers (:ghc-ticket:`26668`)
    
    22
    +- Fixed cast worker/wrapper incorrectly firing on INLINE functions (:ghc-ticket:`26903`)
    
    23
    +- Fixed non-determinism in ``TyLitMap`` by using deterministic maps for strings (:ghc-ticket:`26846`)
    
    24
    +- Fixed non-determinism in ``WithHsDocIdentifiers`` binary instance by using a stable sort (:ghc-ticket:`26858`)
    
    25
    +- Added ``-mcmodel=medium`` module flag to generated LLVM IR on LoongArch
    
    26
    +- Pass the ``mcmodel=medium`` parameter to CC via GHC on LoongArch
    
    27
    +- Pass the ``+evex512`` attribute to LLVM 18+ when ``-mavx512f`` is set (:ghc-ticket:`26410`)
    
    28
    +- Improved error handling in ``getPackageArchives`` (:ghc-ticket:`26383`)
    
    29
    +- Fixed a shadowing bug in implicit parameters (:ghc-ticket:`26451`)
    
    30
    +- Fixed a subtle bug in ``GHC.Core.Utils.mkTick`` that could generate type-incorrect code (:ghc-ticket:`26772`)
    
    31
    +- Fixed a long-standing interaction between ticks and casts in ``Eliminate Identity Cases``
    
    32
    +- ``NamedDefaults``: require the class to be standard or have an in-scope default declaration (:ghc-ticket:`25775`, :ghc-ticket:`25778`)
    
    33
    +
    
    34
    +Runtime System
    
    35
    +~~~~~~~~~~~~~~
    
    36
    +
    
    37
    +- Fixed a deadlock with eventlog flush interval and RTS shutdown (:ghc-ticket:`26573`)
    
    38
    +- Fixed eager black holes: record mutated closure and fix assertion (:ghc-ticket:`26495`)
    
    39
    +- Fixed object file format detection in ``loadArchive`` (:ghc-ticket:`26630`)
    
    40
    +- Use ``INFO_TABLE_CONSTR`` for ``stg_dummy_ret_closure`` (:ghc-ticket:`26745`)
    
    41
    +- Fixed lost wakeups in ``threadPaused`` for threads blocked on black holes (:ghc-ticket:`26324`)
    
    42
    +- Fixed ``stg_AP_STACK`` to push the correct update frame (:ghc-ticket:`26324`)
    
    43
    +- Fixed potential loop in heap reservation logic on certain kernels (:ghc-ticket:`26151`)
    
    44
    +- Don't use CAS without ``PARALLEL_GC`` on
    
    45
    +- Switch prim to use modern atomic compiler builtins (:ghc-ticket:`26729`)
    
    46
    +- Removed obsolete ``CC_SUPPORTS_TLS``, ``HAS_VISIBILITY_HIDDEN``, ``COMPILING_WINDOWS_DLL``,
    
    47
    +  and ``__GNUC__``-related logic
    
    48
    +- Removed the ``-O3`` pragma hack in ``Hash.c``
    
    49
    +- Removed unnecessary Cabal flags
    
    50
    +
    
    51
    +Code Generation
    
    52
    +~~~~~~~~~~~~~~~
    
    53
    +
    
    54
    +- NCG for PPC: add pattern for ``CmmRegOff`` to ``iselExpr64`` (:ghc-ticket:`26828`)
    
    55
    +- PPC NCG: Use libcall for 64-bit ``cmpxchg`` on 32-bit PowerPC (:ghc-ticket:`23969`)
    
    56
    +
    
    57
    +Bytecode Compiler
    
    58
    +~~~~~~~~~~~~~~~~~
    
    59
    +
    
    60
    +- Use 32 bits for breakpoint index (:ghc-ticket:`26325`)
    
    61
    +
    
    62
    +``base`` library
    
    63
    +~~~~~~~~~~~~~~~~
    
    64
    +
    
    65
    +- Expose ``Backtraces`` constructor and fields (:ghc-ticket:`26049`)
    
    66
    +- Store ``StackTrace`` and ``StackSnapshot`` in ``Backtraces``, deferring decoding until display
    
    67
    +- Evaluate backtraces for ``error`` exceptions at the moment they are thrown
    
    68
    +  (`CLC proposal #383 <https://github.com/haskell/core-libraries-committee/issues/383>`__,
    
    69
    +  :ghc-ticket:`26751`)
    
    70
    +
    
    71
    +``ghc-experimental`` library
    
    72
    +~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    73
    +
    
    74
    +- Fixed ``GHC.Exception.Backtrace.Experimental`` module
    
    75
    +- Added ability to customise the collection of exception annotations
    
    76
    +
    
    77
    +``ghc-pkg``
    
    78
    +~~~~~~~~~~~~
    
    79
    +
    
    80
    +- Removed ``traceId`` from ``ghc-pkg`` executable
    
    81
    +
    
    82
    +``ghc-toolchain``
    
    83
    +~~~~~~~~~~~~~~~~~
    
    84
    +
    
    85
    +- Dropped ``ld.gold`` from merge object command
    
    86
    +
    
    87
    +Build System
    
    88
    +~~~~~~~~~~~~
    
    89
    +
    
    90
    +- Added ``hpc`` to release script
    
    91
    +- Use a response file to invoke GHC when analysing dependencies
    
    92
    +- Fixed ``GHC.Platform.Host`` generation for cross stage1 (:ghc-ticket:`26449`)
    
    93
    +- Fixed runtime error during ``users_guide`` build with Sphinx 9.1.0 (:ghc-ticket:`26810`)
    
    94
    +- Added ``ghc-{experimental,internal}.cabal`` to the list of dependencies of the doc target (:ghc-ticket:`26738`)
    
    95
    +
    
    96
    +Wasm Backend
    
    97
    +~~~~~~~~~~~~
    
    98
    +
    
    99
    +- Fixed dyld handling for forward declared ``GOT.func`` items (:ghc-ticket:`26430`)
    
    100
    +- Ensure ``setKeepCAFs()`` is called in GHCi (:ghc-ticket:`26106`)
    
    101
    +- Prevent bundlers from resolving ``import("node:timers")``
    
    102
    +- Use ``import.meta.main`` for proper distinction of Node.js main modules (:ghc-ticket:`26916`)
    
    103
    +
    
    104
    +Included libraries
    
    105
    +~~~~~~~~~~~~~~~~~~
    
    106
    +
    
    107
    +The package database provided with this distribution also contains a number of
    
    108
    +packages other than GHC itself. See the changelogs provided with these packages
    
    109
    +for further change information.
    
    110
    +
    
    111
    +.. ghc-package-list::
    
    112
    +
    
    113
    +    compiler/ghc.cabal:                                  The compiler itself
    
    114
    +    libraries/array/array.cabal:                         Dependency of ``ghc`` library
    
    115
    +    libraries/base/base.cabal:                           Core library
    
    116
    +    libraries/binary/binary.cabal:                       Dependency of ``ghc`` library
    
    117
    +    libraries/bytestring/bytestring.cabal:               Dependency of ``ghc`` library
    
    118
    +    libraries/Cabal/Cabal/Cabal.cabal:                   Dependency of ``ghc-pkg`` utility
    
    119
    +    libraries/Cabal/Cabal-syntax/Cabal-syntax.cabal:     Dependency of ``ghc-pkg`` utility
    
    120
    +    libraries/containers/containers/containers.cabal:    Dependency of ``ghc`` library
    
    121
    +    libraries/deepseq/deepseq.cabal:                     Dependency of ``ghc`` library
    
    122
    +    libraries/directory/directory.cabal:                 Dependency of ``ghc`` library
    
    123
    +    libraries/exceptions/exceptions.cabal:               Dependency of ``ghc`` and ``haskeline`` library
    
    124
    +    libraries/file-io/file-io.cabal:                     Dependency of ``directory`` library
    
    125
    +    libraries/filepath/filepath.cabal:                   Dependency of ``ghc`` library
    
    126
    +    libraries/ghc-boot/ghc-boot.cabal:                   Internal compiler library
    
    127
    +    libraries/ghc-boot-th/ghc-boot-th.cabal:             Internal compiler library
    
    128
    +    libraries/ghc-compact/ghc-compact.cabal:             Core library
    
    129
    +    libraries/ghc-experimental/ghc-experimental.cabal:   Core library
    
    130
    +    libraries/ghc-heap/ghc-heap.cabal:                   GHC heap-walking library
    
    131
    +    libraries/ghci/ghci.cabal:                           The REPL interface
    
    132
    +    libraries/ghc-internal/ghc-internal.cabal:           Core library
    
    133
    +    libraries/ghc-platform/ghc-platform.cabal:           Internal library
    
    134
    +    libraries/ghc-prim/ghc-prim.cabal:                   Core library
    
    135
    +    libraries/haskeline/haskeline.cabal:                 Dependency of ``ghci`` executable
    
    136
    +    libraries/hpc/hpc.cabal:                             Dependency of ``hpc`` executable
    
    137
    +    libraries/integer-gmp/integer-gmp.cabal:             Core library
    
    138
    +    libraries/mtl/mtl.cabal:                             Dependency of ``Cabal`` library
    
    139
    +    libraries/os-string/os-string.cabal:                 Dependency of ``filepath`` library
    
    140
    +    libraries/parsec/parsec.cabal:                       Dependency of ``Cabal`` library
    
    141
    +    libraries/pretty/pretty.cabal:                       Dependency of ``ghc`` library
    
    142
    +    libraries/process/process.cabal:                     Dependency of ``ghc`` library
    
    143
    +    libraries/semaphore-compat/semaphore-compat.cabal:   Dependency of ``ghc`` library
    
    144
    +    libraries/stm/stm.cabal:                             Dependency of ``haskeline`` library
    
    145
    +    libraries/template-haskell/template-haskell.cabal:   Core library
    
    146
    +    libraries/terminfo/terminfo.cabal:                   Dependency of ``haskeline`` library
    
    147
    +    libraries/text/text.cabal:                           Dependency of ``Cabal`` library
    
    148
    +    libraries/time/time.cabal:                           Dependency of ``ghc`` library
    
    149
    +    libraries/transformers/transformers.cabal:           Dependency of ``ghc`` library
    
    150
    +    libraries/unix/unix.cabal:                           Dependency of ``ghc`` library
    
    151
    +    libraries/Win32/Win32.cabal:                         Dependency of ``ghc`` library
    
    152
    +    libraries/xhtml/xhtml.cabal:                         Dependency of ``haddock`` executable
    
    153
    +    utils/haddock/haddock-api/haddock-api.cabal:         Dependency of ``haddock`` executable
    
    154
    +    utils/haddock/haddock-library/haddock-library.cabal: Dependency of ``haddock`` executable

  • docs/users_guide/release-notes.rst
    ... ... @@ -7,3 +7,4 @@ Release notes
    7 7
        9.12.1-notes
    
    8 8
        9.12.2-notes
    
    9 9
        9.12.3-notes
    
    10
    +   9.12.4-notes

  • libraries/base/base.cabal.in
    ... ... @@ -4,7 +4,7 @@ cabal-version: 3.0
    4 4
     -- Make sure you are editing ghc-experimental.cabal.in, not ghc-experimental.cabal
    
    5 5
     
    
    6 6
     name:           base
    
    7
    -version:        4.21.1.0
    
    7
    +version:        4.21.2.0
    
    8 8
     -- NOTE: Don't forget to update ./changelog.md
    
    9 9
     
    
    10 10
     license:        BSD-3-Clause
    

  • libraries/base/changelog.md
    1 1
     # Changelog for [`base` package](http://hackage.haskell.org/package/base)
    
    2 2
     
    
    3
    -## 4.21.2.0 *TBA*
    
    4
    -  * Evaluate backtraces for "error" exceptions at the moment they are thrown. ([CLC proposal #383](https://github.com/haskell/core-libraries-committee/issues/383))
    
    3
    +## 4.21.2.0 *March 2026*
    
    4
    +  * Expose `Backtraces` constructor and fields ([CLC proposal #199](https://github.com/haskell/core-libraries-committee/issues/199), [#26049](https://gitlab.haskell.org/ghc/ghc/-/issues/26049))
    
    5
    +  * Store `StackTrace` and `StackSnapshot` in `Backtraces`, deferring decoding until display
    
    6
    +  * Evaluate backtraces for "error" exceptions at the moment they are thrown ([CLC proposal #383](https://github.com/haskell/core-libraries-committee/issues/383), [#26751](https://gitlab.haskell.org/ghc/ghc/-/issues/26751))
    
    5 7
     
    
    6 8
     ## 4.21.1.0 *Sept 2024*
    
    7 9
       * Fix incorrect results of `integerPowMod` when the base is 0 and the exponent is negative, and `integerRecipMod` when the modulus is zero ([#26017](https://gitlab.haskell.org/ghc/ghc/-/issues/26017)).
    

  • testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
    ... ... @@ -322,7 +322,7 @@ module Control.Exception.Backtrace where
    322 322
       type BacktraceMechanism :: *
    
    323 323
       data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace
    
    324 324
       type Backtraces :: *
    
    325
    -  data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe [GHC.Internal.ExecutionStack.Internal.Location], btrIpe :: GHC.Internal.Maybe.Maybe [GHC.Internal.Stack.CloneStack.StackEntry]}
    
    325
    +  data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe GHC.Internal.ExecutionStack.Internal.StackTrace, btrIpe :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.CloneStack.StackSnapshot}
    
    326 326
       collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Types.IO Backtraces
    
    327 327
       displayBacktraces :: Backtraces -> GHC.Internal.Base.String
    
    328 328
       getBacktraceMechanismState :: BacktraceMechanism -> GHC.Types.IO GHC.Types.Bool
    

  • testsuite/tests/interface-stability/base-exports.stdout-mingw32
    ... ... @@ -322,7 +322,7 @@ module Control.Exception.Backtrace where
    322 322
       type BacktraceMechanism :: *
    
    323 323
       data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace
    
    324 324
       type Backtraces :: *
    
    325
    -  data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe [GHC.Internal.ExecutionStack.Internal.Location], btrIpe :: GHC.Internal.Maybe.Maybe [GHC.Internal.Stack.CloneStack.StackEntry]}
    
    325
    +  data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe GHC.Internal.ExecutionStack.Internal.StackTrace, btrIpe :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.CloneStack.StackSnapshot}
    
    326 326
       collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Types.IO Backtraces
    
    327 327
       displayBacktraces :: Backtraces -> GHC.Internal.Base.String
    
    328 328
       getBacktraceMechanismState :: BacktraceMechanism -> GHC.Types.IO GHC.Types.Bool
    

  • testsuite/tests/interface-stability/base-exports.stdout-ws-32
    ... ... @@ -322,7 +322,7 @@ module Control.Exception.Backtrace where
    322 322
       type BacktraceMechanism :: *
    
    323 323
       data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace
    
    324 324
       type Backtraces :: *
    
    325
    -  data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe [GHC.Internal.ExecutionStack.Internal.Location], btrIpe :: GHC.Internal.Maybe.Maybe [GHC.Internal.Stack.CloneStack.StackEntry]}
    
    325
    +  data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe GHC.Internal.ExecutionStack.Internal.StackTrace, btrIpe :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.CloneStack.StackSnapshot}
    
    326 326
       collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Types.IO Backtraces
    
    327 327
       displayBacktraces :: Backtraces -> GHC.Internal.Base.String
    
    328 328
       getBacktraceMechanismState :: BacktraceMechanism -> GHC.Types.IO GHC.Types.Bool
    

  • testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
    ... ... @@ -4324,13 +4324,13 @@ module GHC.Exception.Backtrace.Experimental where
    4324 4324
       data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe GHC.Internal.ExecutionStack.Internal.StackTrace, btrIpe :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.CloneStack.StackSnapshot}
    
    4325 4325
       type CollectExceptionAnnotationMechanism :: *
    
    4326 4326
       data CollectExceptionAnnotationMechanism = ...
    
    4327
    -  collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Internal.Types.IO Backtraces
    
    4328
    -  collectExceptionAnnotation :: GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO GHC.Internal.Exception.Context.SomeExceptionAnnotation
    
    4327
    +  collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Types.IO Backtraces
    
    4328
    +  collectExceptionAnnotation :: GHC.Internal.Stack.Types.HasCallStack => GHC.Types.IO GHC.Internal.Exception.Context.SomeExceptionAnnotation
    
    4329 4329
       displayBacktraces :: Backtraces -> GHC.Internal.Base.String
    
    4330
    -  getBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.IO GHC.Internal.Types.Bool
    
    4331
    -  getCollectExceptionAnnotationMechanism :: GHC.Internal.Types.IO CollectExceptionAnnotationMechanism
    
    4332
    -  setBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.Bool -> GHC.Internal.Types.IO ()
    
    4333
    -  setCollectExceptionAnnotation :: forall a. GHC.Internal.Exception.Context.ExceptionAnnotation a => (GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO a) -> GHC.Internal.Types.IO ()
    
    4330
    +  getBacktraceMechanismState :: BacktraceMechanism -> GHC.Types.IO GHC.Types.Bool
    
    4331
    +  getCollectExceptionAnnotationMechanism :: GHC.Types.IO CollectExceptionAnnotationMechanism
    
    4332
    +  setBacktraceMechanismState :: BacktraceMechanism -> GHC.Types.Bool -> GHC.Types.IO ()
    
    4333
    +  setCollectExceptionAnnotation :: forall a. GHC.Internal.Exception.Context.ExceptionAnnotation a => (GHC.Internal.Stack.Types.HasCallStack => GHC.Types.IO a) -> GHC.Types.IO ()
    
    4334 4334
     
    
    4335 4335
     module GHC.PrimOps where
    
    4336 4336
       -- Safety: Unsafe