GHC 9.10.1-alpha2 is now available!

The GHC developers are very pleased to announce the availability
of the second alpha release of GHC 9.10.1. Binary distributions, source
distributions, and documentation are available at downloads.haskell.org.

We hope to have this release available via ghcup shortly.

GHC 9.10 will bring a number of new features and improvements, including:

  • The introduction of the GHC2024 language edition, building upon
    GHC2021 with the addition of a number of widely-used extensions.

  • Partial implementation of the GHC Proposal #281, allowing visible
    quantification to be used in the types of terms.

  • Extension of LinearTypes to allow linear let and where
    bindings

  • The implementation of the exception backtrace proposal, allowing the annotation of exceptions with backtraces, as well
    as other user-defined context

  • Further improvements in the info table provenance mechanism, reducing
    code size to allow IPE information to be enabled more widely

  • Javascript FFI support in the WebAssembly backend

  • Improvements in the fragmentation characteristics of the low-latency
    non-moving garbage collector.

  • … and many more

A full accounting of changes can be found in the release notes.
As always, GHC’s release status, including planned future releases, can
be found on the GHC Wiki status.

We would like to thank GitHub, IOG, the Zw3rk stake pool,
Well-Typed, Tweag I/O, Serokell, Equinix, SimSpace, the Haskell
Foundation, and other anonymous contributors whose on-going financial
and in-kind support has facilitated GHC maintenance and release
management over the years. Finally, this release would not have been
possible without the hundreds of open-source contributors whose work
comprise this release.

As always, do give this release a try and open a ticket if you see
anything amiss.

23 Likes

done Add GHC 9.10.1-alpha2 · haskell/ghcup-metadata@159705f · GitHub

3 Likes

In accordance with GHC Proposal #448, the TypeAbstractions extension has been extended to support @ -binders in lambdas and function equations

This feature is an experimental alternative to ScopedTypeVariables, see the Type Abstractions in Functions section.

The scope of a can be extended to cover the function equation as well by enabling ScopedTypeVariables. Using a separate binder like @t is the modern and more flexible alternative for that, capable of handling higher-rank scenarios (see the higherRank example below).

So, IIUC, I could set NoScopedTypeVariables and rely completely on TypeAbstractions?

If you are not using GHCup to manage Stack’s use of different versions of GHC, you can configure Stack to try to use this version of GHC by augmenting the default setup-info dictionary. For example, on Windows:

snapshot: nightly-2024-03-30
compiler: ghc-9.10.0.20240328 # Override the compiler version in the snapshot

# Not needed once Stack has setup GHC 9.10.0.20240328:
setup-info:
  ghc:
    windows64:
      9.10.0.20240328:
        url: https://downloads.haskell.org/ghc/9.10.1-alpha2/ghc-9.10.0.20240328-x86_64-unknown-mingw32.tar.xz
        # Can be extended with SHA protections etc: see https://docs.haskellstack.org/en/stable/yaml_configuration/#setup-info

However, I think Stack will fall over with (extract, reformatted for clarity):

Warning: Stack has not been tested with GHC versions 9.10 and above, and using 9.10.0.20240328,
         this may fail.
Warning: Stack has not been tested with Cabal versions 3.12 and above, but version 3.11.0.0 was
         found, this may fail.
...
[2 of 3] Compiling StackSetupShim   ( C:\sr\setup-exe-src\setup-shim-9p6GVs8J.hs, C:\sr\setup-exe-src\setup-shim-9p6GVs8J.o )

C:\sr\setup-exe-src\setup-shim-9p6GVs8J.hs:38:28: error: [GHC-88464]
    Variable not in scope:
      initialBuildSteps
        :: FilePath
           -> PackageDescription
           -> LocalBuildInfo
           -> Distribution.Verbosity.Verbosity
           -> IO ()
   |
38 |             | null rest -> initialBuildSteps distPref pkg_descr lbi verbosity
   |                            ^^^^^^^^^^^^^^^^^

Error: [S-6374]
       While building simple Setup.hs (scroll up to its section to see the error) using:
       ...\x86_64-windows\ghc-9.10.0.20240328\bin\ghc-9.10.0.20240328.exe 
       -rtsopts 
       -threaded 
       -clear-package-db 
       -global-package-db 
       -hide-all-packages 
       -package base 
       -main-is StackSetupShim.mainOverride 
       -package Cabal-3.11.0.0 
       C:\sr\setup-exe-src\setup-9p6GVs8J.hs
       C:\sr\setup-exe-src\setup-shim-9p6GVs8J.hs 
       -o C:\sr\setup-exe-cache\x86_64-windows\tmp-Cabal-simple_9p6GVs8J_3.11.0.0_ghc-9.10.0.20240328.exe
       Process exited with code: ExitFailure 1

That is because Cabal-3.11.0.0 dropped Distribution.Simple.Build.initialBuildSteps (Cabal #9474). I’m looking into that. EDIT: I anticipate that this will resolved in due course.

The master branch version of Stack now accommodates Cabal-3.11.0.0. If you are not using GHCup to manage versions of Stack: stack upgrade --source-only --git.

Correction. You can do the same with ghcup :slight_smile:

Add this to ~/.ghcup/config.yaml:

url-source:
  - StackSetupURL
  - setup-info:
      ghc:
        windows:
          9.10.0.20240328:
            url: https://downloads.haskell.org/ghc/9.10.1-alpha2/ghc-9.10.0.20240328-x86_64-unknown-mingw32.tar.xz
            # Can be extended with SHA protections etc: see https://docs.haskellstack.org/en/stable/yaml_configuration/#setup-info

This uses the same strategy and metadata to install GHC like stack does, but manages the installation like anything else in GHCup.

More information here: https://www.haskell.org/ghcup/guide/#using-stacks-setup-info-metadata-to-install-ghc

4 Likes