Skip to content

Commit 1c56805

Browse files
committed
GHC 9.12 and cabal 3.14 release announcement
1 parent 3975414 commit 1c56805

File tree

1 file changed

+127
-0
lines changed

1 file changed

+127
-0
lines changed

content/ghc-9.12-cabal-3.14/index.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
+++
2+
title = "GHC 9.12 & cabal 3.14 releases"
3+
date = 2024-12-22
4+
[taxonomies]
5+
authors = ["Hécate"]
6+
categories = ["Cabal", "GHC"]
7+
tags = ["Release"]
8+
+++
9+
10+
To conclude the year 2024, GHC 9.12 and cabal 3.14 have been released!
11+
12+
<!-- more -->
13+
14+
The GHC and Cabal teams are happy to announce the release of GHC 9.12 and cabal 3.14.
15+
16+
Here are some highlights:
17+
18+
## GHC 9.12
19+
20+
### Language Extensions
21+
22+
This release brings its lot of new and exciting extensions:
23+
* [Multiline string literals][MultilineStrings] to spread a piece of text over several lines;
24+
* [Or-Patterns][OrPatterns], allowing you to match on several patterns in a single `case` branch:
25+
26+
```haskell
27+
data Sweet = Cupcake | Liquorice | Cookie | Raisins
28+
29+
-- Without Or-Patterns
30+
tasty Cupcake = True
31+
tasty Cookie = True
32+
tasty _ = False
33+
34+
-- With Or-Patterns
35+
tasty (Cupcake; Cookie) = True
36+
tasty (Liquorice; Raisins) = False
37+
```
38+
39+
* [NamedDefaults][NamedDefaults] allows you to create type defaulting declarations for literals other than for the `Num` class. This mechanism is used to make sure that in the expression `print (6 + 7)`, the multiplication gets a concrete type like `Integer`, `Int` or `Double`, instead of the vague  `Num a => a`.
40+
You can now apply this mechanism to other typeclasses, like:
41+
42+
```haskell
43+
default IsString (Text, String)
44+
```
45+
46+
Which means that in a module with [`OverloadedStrings`][OverloadedStrings], string literals `"like this"` will default to [`Text`][Text] instead of a vague polymorphic type.
47+
48+
### Base Library
49+
50+
* Improvements to backtraces and exceptions. Lots of them.
51+
52+
#### ⚠️ Deprecations
53+
54+
* The deprecation cycle of [GHC.Pack][GHC.Pack] has come to an end. Goodbye!
55+
* [GHC.Desugar][GHC.Desugar] will be removed in GHC 9.14.
56+
57+
### Code Generation
58+
59+
* Experimental support for the [RISC-V Platform](https://gitlab.haskell.org/ghc/ghc/-/issues/16783);
60+
* SIMD! In the x86: Most floating-point operations and some integer vector operations are supported 128-bit vectors **without LLVM**. [Get in touch](https://matrix.to/#/#ghc:matrix.org) to help with this effort
61+
* You can try the new experimental [`-fobject-determinism`][-fobject-determinism] flag to enable deterministic object code generation.
62+
63+
#### ⚠️ Deprecations
64+
65+
* Support 32-bit Windows & macOS/iOS has been dropped;
66+
* As a result, friendship with the `stdcall` calling convention for FFI is ended. Now `ccall` is your best friend.
67+
68+
You can read the full release notes here: https://downloads.haskell.org/ghc/9.12.1/docs/users_guide/9.12.1-notes.html
69+
70+
## Cabal 3.14
71+
72+
### New things
73+
74+
* (Spec v3.14 only) New field: `extra-files` allows you to bundle files in the source distribution (*sdist*) of your cabal package. It serves as an alternative when the files you want to bundle do not fit in the existing `data-files` (for runtime data), `extra-source-files` (built by cabal) or `extra-doc-files` (shipped with Haddocks). This field has no inherent meaning, to avoid misuse of the already existing fields. For instance, you can use `extra-files` to ship `stack.yaml` files, which are not used either by the program at run-time, nor by Cabal or Haddock.
75+
76+
* You can now compile projects dynamically with profiling enabled. The following options are now available:
77+
* cabal.project: `profiling-shared: <Boolean>`;
78+
* cabal file: `ghc-prof-shared-options` for passing options when building in profiling dynamic way;
79+
* Command-line arguments: `--enable-profiling --enable-executable-dynamic`.
80+
81+
* [New GHC options and extensions](https://downloads.haskell.org/ghc/9.12.1/docs/users_guide/9.12.1-notes.html) are supported.
82+
83+
* New build type: Hooks. This build type, intended to eventually replace the Custom build type, integrates better with the rest of the ecosystem (cabal-install, Haskell Language Server).
84+
85+
* The experimental `haddock-project` command supports sub-components.
86+
87+
### Changed
88+
89+
* `cabal init` remembers the chosen language within current session (`Haskell2010`, `GHC2021`, etc.).
90+
91+
* `cabal check` will warn about the insecure `git://` protocol in source-repository.
92+
93+
* Enable recompilation avoidance during Haddock generation.
94+
95+
* Clarify error message when `pkg-config` is not found.
96+
97+
* Print out which project file(s) we are using.
98+
99+
### Fixed
100+
101+
* The `--promised-dependency` flag now accepts the version of a package in the package name. Previously you could only call it with an argument like `void=void-0.5.8`.
102+
Now, it is possible to write: `--promised-dependency=void-0.5.8=void-0.5.8`.
103+
104+
* Always pass `ghc-options` to GHC.
105+
106+
* Enhance error detection for cabal root project files, including broken symlinks.
107+
108+
* Don't pass `--coverage-for` for non-dependency libs of testsuite.
109+
110+
* Fix a bug that causes `cabal init` to crash if `git` is not installed.
111+
112+
### Unresolved
113+
114+
* Recompilation avoidance during Haddock generation sometimes does not work on Windows ([haskell/cabal#9177](https://github.com/haskell/cabal/pull/9177#issuecomment-2167768305)).
115+
116+
You can see the full changelogs for [Cabal & Cabal-syntax](https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.14.1.0.md), and for [cabal-install and cabal-install-solver](https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.14.0.0.md)
117+
118+
As always, the Cabal team is always welcoming of new contributors. We have a nice back catalogue of bugs, oddities and feature requests. Stop by our [matrix channel](https://matrix.to/#/#hackage:matrix.org)!
119+
120+
[MultilineStrings]: https://downloads.haskell.org/ghc/9.12.1/docs/users_guide/exts/multiline_strings.html#multiline-string-literals
121+
[OrPatterns]: https://downloads.haskell.org/ghc/9.12.1/docs/users_guide/exts/or_patterns.html#or-patterns
122+
[NamedDefaults]: https://downloads.haskell.org/ghc/9.12.1/docs/users_guide/exts/named_defaults.html#named-default-declarations
123+
[OverloadedStrings]: https://downloads.haskell.org/ghc/9.12.1/docs/users_guide/exts/overloaded_strings.html
124+
[Text]: https://hackage.haskell.org/package/text/docs/Data-Text.html#t:Text
125+
[-fobject-determinism]: https://downloads.haskell.org/ghc/9.12.1/docs/users_guide/using-optimisation.html#ghc-flag-fobject-determinism
126+
[GHC.Pack]: https://gitlab.haskell.org/ghc/ghc/-/issues/21461
127+
[GHC.Desugar]: https://hackage.haskell.org/package/base-4.21.0.0/docs/GHC-Desugar.html

0 commit comments

Comments
 (0)