@@ -416,9 +416,21 @@ stack exec -- sh ./etc/scripts/hlint.sh
416
416
417
417
## Code syntax
418
418
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
420
420
set using the ` language ` key in the ` package.yaml ` file.
421
421
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
+
422
434
Stack makes use of single-constructor types where the constructor has a large
423
435
number of fields. Some of those fields have similar types, and so on. Given
424
436
that, Stack makes use of ` OverloadedRecordDot ` , introduced in GHC 9.2.1. It also
@@ -510,8 +522,8 @@ stack test
510
522
511
523
The ` --file-watch ` is a very useful option to get quick feedback. However,
512
524
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
515
527
feedback. A description of this follows below.
516
528
517
529
0 commit comments