... | ... | @@ -7,6 +7,18 @@ This guide summarises the changes you may need to make to your code to migrate f |
|
|
|
|
|
## Compiler changes
|
|
|
|
|
|
### Type variable order in GADT constructors
|
|
|
|
|
|
|
|
|
The order in which type variables are quantified in GADT constructor type signatures has changed. Before, if you had `MkT` as below:
|
|
|
|
|
|
```
|
|
|
dataT a whereMkT:: forall b a. b ->T a
|
|
|
```
|
|
|
|
|
|
|
|
|
Then the type of `MkT` would (counterintuitively) be `forall a b. b -> T a`! Now, GHC quantifies the type variables in the order that the users writes them, so the type of `MkT` is now `forall b a. b -> T a` (this matters for `TypeApplications`).
|
|
|
|
|
|
### `TypeInType` is pickier
|
|
|
|
|
|
|
... | ... | |