Skip to content

Commit c679949

Browse files
committed
Merge branch 'stable'
2 parents 2e73279 + 063a324 commit c679949

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,21 @@ stack exec -- sh ./etc/scripts/hlint.sh
415415

416416
## Code syntax
417417

418-
Stack makes use of GHC's `GHC2021` collection of language extensions, which is
418+
Stack makes use of GHC's `GHC2024` collection of language extensions. That is
419419
set using the `language` key in the `package.yaml` file.
420420

421+
The `GHC2024` edition enables the `MonoLocalBinds` language extension. Enabling
422+
the extension can change how GHC infers the types of local bindings (that is,
423+
let-bound or where-bound variables). When enabled it means that the types of a
424+
group of local bindings are not generalised unless:
425+
426+
* any of its binders has a partial type signature; or
427+
428+
* all of its free variables are closed. If a variable is closed then its type
429+
definitely has no free type variables. A variable imported from another module
430+
is closed. A variable that is let-bound and has an explicit type signature
431+
with no free type variables is closed.
432+
421433
Stack makes use of single-constructor types where the constructor has a large
422434
number of fields. Some of those fields have similar types, and so on. Given
423435
that, Stack makes use of `OverloadedRecordDot`, introduced in GHC 9.2.1. It also

0 commit comments

Comments
 (0)