Skip to content
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

Remove PersistCore class #1238

Open
parsonsmatt opened this issue Apr 20, 2021 · 0 comments
Open

Remove PersistCore class #1238

parsonsmatt opened this issue Apr 20, 2021 · 0 comments

Comments

@parsonsmatt
Copy link
Collaborator

The PersistCore class defines the data family data BackendKey backend, and implementations use this to specify the default or implied key of an entity.

This is only useful in the case of mpsGeneric being true. Then, an Entity (Foo SqlBackend) will contain an entityKey :: Key (Foo SqlBackend), which (by default) will be BackendKey SqlBackend. Meanwhile, an Entity (Foo MongoContext) will contain a Key (Foo MongoContext), which is a newtype around Mongo.ObjectId.

If removing mpsGeneric #1204 is feasible, then we can also remove PersistCore as a class. Then, BackendKey becomes a plain type family, and it can point to plain newtypes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant