-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Member constraints only allow nesting on the right #213
Comments
We can, however, use advanced overlap techniques involving having a type family compute the path to a member and define instances against said path. That would allow us to provide It remains to be seen what this would do to compile times. |
This problem is also preventing us from splitting up |
This could potentially make it more convenient to write carriers handling multiple effects, since they could all nest on the left, with other effects on the right, making the shape of almost all Further, @lexi-lambda had an idea for the carrier interface which IIRC would benefit from having this kind of uniformity. |
I’m experimenting with this in |
Negligible effect on compile times unless combined with a type family solution to #212. |
:+:
can technically form the branches of a tree, but we always use it as a right-nested,Pure
- orLift m
-terminated list.This means that following #199, we can’t usefully reintroduce
NonDet
as a synonym forChoose :+: Empty
, because that sum would be nested on the left; and while that wouldn’t impair anything using theAlternative
interface, anything requiringMember Choose sig
orMember Empty sig
wouldn’t work, since neitherChoose
norEmpty
separately unifies withChoose :+: Empty
together.The root of the problem is that even with overlapping instances,
ghc
’s non-backtracking constraint solver doesn’t allow us to select different instances for occurrences on the left or the right depending on the solution of the context’s constraints.The text was updated successfully, but these errors were encountered: