File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -415,9 +415,21 @@ stack exec -- sh ./etc/scripts/hlint.sh
415
415
416
416
## Code syntax
417
417
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
419
419
set using the ` language ` key in the ` package.yaml ` file.
420
420
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
+
421
433
Stack makes use of single-constructor types where the constructor has a large
422
434
number of fields. Some of those fields have similar types, and so on. Given
423
435
that, Stack makes use of ` OverloadedRecordDot ` , introduced in GHC 9.2.1. It also
You can’t perform that action at this time.
0 commit comments