daig / daig/intrinsic-superclasses
Weaken superclass requirements
- Dominant language
- Haskell
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
currently if we write
`[instances | Foo f => Bar (Baz f) where ...|]`
then all the methods will have the required context `Foo f`, even if that particular superclass does not require `Foo`, making our instances hold in less places than they should. This is remedied by manually adding a superclass instances with the correct context before `instances`, but in the worst case every superclass has a weaker context than the subclass so `instances` is useless.
We'd like to automatically weaken the context for each superclass based on the actual constraints on the default methods. This is likely to be tricky and possibly require implementing type inference.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.