Skip to content

Commit 9ab72e3

Browse files
committed
Rename the language extension stability post and update the date
1 parent 464b8eb commit 9ab72e3

File tree

1 file changed

+21
-21
lines changed
  • content/investigating-language-extension-semantics

1 file changed

+21
-21
lines changed

content/investigating-lang-ext-semantics/index.md renamed to content/investigating-language-extension-semantics/index.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
+++
22
title = "Analyzing language extension semantics"
3-
date = 2025-11-26
3+
date = 2025-11-30
44
[taxonomies]
55
authors = ["Jappie Klooster"]
66
categories = ["Haskell Foundation"]
77
tags = ["Community", "Stability"]
88
+++
99

1010
Hi I'm [Jappie](https://jappie.me) and I volunteer for the [Haskell Foundation Stability Working Group](https://blog.haskell.org/stability-working-group/).
11-
Recently we analyzed the [head.hackage](https://gitlab.haskell.org/ghc/head.hackage) patches to understand
11+
Recently we analyzed the [head.hackage](https://gitlab.haskell.org/ghc/head.hackage) patches to understand
1212
why code breaks on new GHC releases.
13-
"head.hackage" is a repository of patches for Hackage.
14-
GHC engineers use these to test out new GHC builds on a wide range of
15-
Hackage packages without having to upstream[^upstream] a patch, which can take time.
16-
Instead, they can put the patch in "head.hackage"
13+
"head.hackage" is a repository of patches for Hackage.
14+
GHC engineers use these to test out new GHC builds on a wide range of
15+
Hackage packages without having to upstream[^upstream] a patch, which can take time.
16+
Instead, they can put the patch in "head.hackage"
1717
and immediately test it on a wide range of packages.
18-
Surprisingly, most breakage wasn’t caused by
18+
Surprisingly, most breakage wasn’t caused by
1919
[Template Haskell](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/template_haskell.html),
2020
it came from deeper semantic changes in language extensions.
2121
The meaning of (some) language extensions changed between GHC releases.
22-
This post walks through the main categories of breakage,
22+
This post walks through the main categories of breakage,
2323
why they happened, and what they tell us about long-term stability.
24-
If you care about a smoother upgrade path for Haskell users,
24+
If you care about a smoother upgrade path for Haskell users,
2525
we invite you to participate in the [Haskell Foundation Stability Working Group](https://blog.haskell.org/stability-working-group/).
2626

2727

@@ -71,15 +71,15 @@ to do this under certain existential conditions:
7171
```
7272

7373
You have to insert a lambda, which apparently has some performance impact.
74-
This had a big impact on [Yesod stacks](https://www.yesodweb.com/book),
75-
whose code generation helpfully created
74+
This had a big impact on [Yesod stacks](https://www.yesodweb.com/book),
75+
whose code generation helpfully created
7676
the database alias in the template:
7777
```haskell
7878
type DB a = forall (m :: Type -> Type).
7979
(MonadUnliftIO m) => ReaderT SqlBackend m a
8080
```
8181

82-
Normally this is quite convenient,
82+
Normally this is quite convenient,
8383
however with the simplified subsumption change,
8484
any code that interacts with the database now has to insert those lambdas.
8585
As you can imagine this would in many places for a commercial code base.
@@ -101,15 +101,15 @@ So the community is better off, despite this causing a fair bit of work.
101101
```diff
102102
--- a/src/Ipe/Content.hs
103103
+++ b/src/Ipe/Content.hs
104-
@@ -288,6 +288,14 @@
105-
104+
@@ -288,6 +288,14 @@
105+
106106
+instance Fractional r => IsTransformable (IpeObject r) where
107107
+ transformBy t (IpeGroup i) = IpeGroup $ i&core %~ transformBy t
108108
+ ...
109109
makePrisms ''IpeObject
110-
111-
@@ -303,14 +311,6 @@
112-
110+
111+
@@ -303,14 +311,6 @@
112+
113113
-instance Fractional r => IsTransformable (IpeObject r) where
114114
- transformBy t (IpeGroup i) = IpeGroup $ i&core %~ transformBy t
115115
- ...
@@ -118,7 +118,7 @@ So the community is better off, despite this causing a fair bit of work.
118118
## (1) Parser change
119119

120120
The parser is the component of the compiler that transforms text
121-
into a memory structure the compiler can work with.
121+
into a memory structure the compiler can work with.
122122
This structure is called an abstract syntax tree.
123123

124124
```diff
@@ -140,7 +140,7 @@ disallowing `!` before parens.
140140
Here the bang `!` indicates strict fields.
141141
Technically this doesn't fit into the category
142142
because the core language isn't a language extension.
143-
But semantics did change!
143+
But semantics did change!
144144
Actually I don't think we expected to find something like this at all.
145145
I'm not sure how relevant this is to discuss further because it appears
146146
quite rare for someone to do this.
@@ -170,7 +170,7 @@ is that part of the syntax for type abstractions landed in GHC 9.2,
170170
however 9.8 and onwards requires you to enable this language extension.
171171
This appeared because certain new functionality was introduced behind an
172172
old language extension flag, according to [this proposal](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0448-type-variable-scoping.rst#4type-arguments-in-constructor-patterns). It says we don't want to introduce new functionality behind established extensions,
173-
so that's why we require TypeAbstractions now,
173+
so that's why we require TypeAbstractions now,
174174
where previously ScopedTypeVariables and TypeApplications were enough.
175175

176176
This extension enables you to bind type variables in pattern matches.
@@ -189,7 +189,7 @@ I don't know why this happened like this, but it happened in 2023:
189189
```
190190

191191
## (4) Star is type
192-
This change was announced via a warning.
192+
This change was announced via a warning.
193193
It tells users to write `Type` instead of `*` for kinds representing types.
194194
A kind is essentially the type of a type,
195195
and as a concept is used for type-level programming type safety.

0 commit comments

Comments
 (0)