... | ... | @@ -99,4 +99,17 @@ 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. |
|
|
\ No newline at end of file |
|
|
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.
|
|
|
|
|
|
## Library changes
|
|
|
|
|
|
### New quantified constraint superclasses on `Eq1`, `Show1` etc
|
|
|
|
|
|
The classes `Eq1`, `Ord1`, `Show1`, `Read1`, `Eq2`, `Ord2`, `Show2`, `Read2` have acquired new superclasses, e.g.
|
|
|
|
|
|
```diff
|
|
|
-class Eq1 f where
|
|
|
+class (forall a. Eq a => Eq (f a)) => Eq1 f where
|
|
|
```
|
|
|
|
|
|
To adapt to this change, you might need to define new instances or add contexts to satisfy these superclass constraints. A detailed migration guide is available [here](https://github.com/haskell/core-libraries-committee/blob/main/guides/functor-combinator-instances-and-class1s.md). |