... | ... | @@ -101,6 +101,31 @@ instance (CanBeAliased (Op rep), Show (OpWithAliases (Op rep))) => RepTypes (Ali |
|
|
|
|
|
This fix is perhaps a bit surprising, as the `Show (OpWithAliases (Op rep))` constraint might seem redundant. But it is actually *not* redundant, precisely because GHC will not expand superclasses in the `CanBeAliased (Op rep)` constraint.
|
|
|
|
|
|
## GHC API changes
|
|
|
|
|
|
### `Type` vs `Constraint`
|
|
|
|
|
|
GHC now enforces the distinction between types and constraints in Core. Recall the definition
|
|
|
|
|
|
```haskell
|
|
|
type Type = TYPE (BoxedRep Lifted)
|
|
|
```
|
|
|
|
|
|
We now also have:
|
|
|
|
|
|
```haskell
|
|
|
type Constraint = CONSTRAINT (BoxedRep Lifted)
|
|
|
```
|
|
|
|
|
|
This is mostly an internal refactoring, but it can affect users of the GHC API in the following ways:
|
|
|
|
|
|
- The function arrow `FunTy` now stores a `FunTyFlag` instead of an `AnonArgFlag`. `splitFunTy` now returns this information in addition to the other results.
|
|
|
- The function coercion `FunCo` now takes two `FunTyFlag` arguments.
|
|
|
- `mkForAllTy` now takes a single `ForAllTyBinder` argument instead of a separate variable and visibility.
|
|
|
- The `Nth` coercion constructor has been renamed to `SelCo`, which distinguishes between decomposing a `TyConApp`, a function type, and a forall type. Relevant functions have been adapted, e.g. `mkNthCo` is now `mkSelCo`, etc.
|
|
|
- The pattern synonyms `One, Many :: Mult` have been renamed to `OneTy` and `ManyTy`.
|
|
|
- Type equality comparison functions such as `eqType` are now exported from `GHC.Core.TyCo.Compare` instead of `GHC.Core.Type`.
|
|
|
|
|
|
## Library changes
|
|
|
|
|
|
### New quantified superclasses on `Eq1`, `Show1` etc
|
... | ... | |