-
Notifications
You must be signed in to change notification settings - Fork 36
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
Defunctionalization symbols should be given fixity declarations #323
Comments
Implementing this wouldn't be too hard. However, we would need to change significantly less code if we had #319 merged first, so this is blocked on that. |
Forgive me if I'm being dense, but is |
Sure. I frequently write types of the form |
OK. Merge away, then. :) |
singletons
provides a promoted version of the familiar composition function:The promoted version is given the name
(:.)
and (after #322) is given a fixity ofinfixr 9
. However, you can't really take advantage of the fact that(:.)
isinfixr 9
. Why? To do so, you'd need to be able to write something like this:But those aren't fully saturated uses of
(:.)
(which is a type family that takes three arguments), so GHC will reject that. On the other hand, you can use defunctionalization symbols to write:However, this will associate to the left, not the right! This is because while
(:.)
is given a fixity ofinfixr 9
, none of its defunctionalization symbols are. It seems like they ought to, though, especially since that's effectively the only way to exploit this right-associativity.The text was updated successfully, but these errors were encountered: