-
Notifications
You must be signed in to change notification settings - Fork 11
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
Simplification of types, easier interop with other libraries #20
Conversation
looks good to me. Append a ?w=q to avoid looking at all the indentation changes |
sorry, I meant ?w=1 |
Bumping this issue. persistent 2.0 will require some form of different API to make a mongoDB backend, I'd like to move ahead on figuring out how we can make that happen. |
@superbobry @knsd @selectel can you take a look? |
@superbobry @knsd please take a look, +1 |
Michael, I like the proposal, so +1 for merging this. Me and @knsd are working on the new MongoDB driver, so now is the right time to discuss the bad parts in the existing API. |
Hello @snoyberg, sorry for delay. I agree with your ideas, and I've just merged your PR, unfortunately it contains some backward incompatible changes, so we need to update documentation and usage examples and release new version after that. |
Awesome, thanks! |
I've been working on a simplified approach to setting up types and classes in persistent. In this process, I realized that the current setup of the mongoDB package will make such a rewrite impossible, since mongoDB forces usage of the
Action
transformer without exposing its internals.I've worked on a fairly substantial overhaul of the types, which doesn't really change the inner operations or the user-facing API in a significant way. Some of the ideas behind this are described in my not-yet-published blog post on the subject:
https://www.fpcomplete.com/tutorial-preview/2896/z9jwaCGLzb
I'm not sure if all of the changes I've made here will be acceptable to you for merging, but I'd like to discuss two changes in particular:
ErrorT
from the transformer stack.Action
, use aReaderT Context
type. Alternatively, if you want to keep theAction
type, exposing its constructor so that persistent could treat it as aReaderT
.Pinging @gregwebs.