Skip to content

Commit 063a324

Browse files
committed
Update for GHC2024 language extension edition
1 parent 714b697 commit 063a324

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,21 @@ stack exec -- sh ./etc/scripts/hlint.sh
416416

417417
## Code syntax
418418

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

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

511523
The `--file-watch` is a very useful option to get quick feedback. However,
512524
running the entire test suite after each file change will slow you down. You
513-
will need to specify which test suite (unit test or integration) and pass
514-
arguments to specify which module you'd specifically like to run to get quick
525+
will need to specify which test suite (unit test or integration) and pass
526+
arguments to specify which module you'd specifically like to run to get quick
515527
feedback. A description of this follows below.
516528

517529

0 commit comments

Comments
 (0)