-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
Replace Proxy with TypeApplications #1273
Comments
@poscat0x04, I'm not completely convinced the gains provided are worth the implementation effort, breakage / loss of backwards compatibility, adoption hindrance, ease-of type inference. The tangible gains are essentially the removal of a few characters of boilerplate. It's also possible to use api1 = serve (Proxy :: Proxy API) handlers -- old
api2 = serve (Proxy @ API) handlers -- current
api3 = serve @API handlers -- proposed |
Well I don't think backward compatibility is much of a issue since
|
@poscat0x04 what tangible benefits does this provide besides boilerplate reduction of a few characters? This change requires modifying every instance of every interpretation for every package. Also, |
I feel like the answer is no, but I'll ask anyway: Do For contact, I came here after my work code base encountered issues with this compile performance issue: #986 |
It looks like the answer is actually yes... though I'd want to test to be totally sure. https://gitlab.haskell.org/ghc/ghc/-/issues/18902#note_324353 I found out type applications are basically implemented in core and were exposed upward, so this isn't so shocking with that information. It seems possible this could help servant compile times. |
#390 there was a proposal 4 years ago on removing Proxy but was rejected . I think the extension TypeApplications is stable enough now so can we reconsider the proposal?
The text was updated successfully, but these errors were encountered: